<GCKUIImage Picker> פרוטוקול
אובייקט המשמש לבחירת תמונה למטרה נתונה מאובייקט GCKMediaMetadata.
ה-framework בוחר תמיד את התמונה הראשונה מהמטא-נתונים לכל השימושים בהטמעת ברירת מחדל פנימית. האפליקציה יכולה לספק הטמעה מותאמת אישית על ידי הגדרת המאפיין GCKCastContext::imagePicker.
- מאז
- 3.0
יורש את <NSObject>.
מחזירה תמונה מהסוג שצוין מהמטא-נתונים של המדיה.
- Parameters
-
imageHints | The hints about how to pick the image. |
metadata | The media metadata to pick from. |
- החזרות
- התמונה שנבחרה, או
nil
אם אין תמונה מתאימה לסוג המבוקש.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2023-12-01 (שעון UTC).
[null,null,["עדכון אחרון: 2023-12-01 (שעון UTC)."],[[["`GCKUIImagePicker` protocol helps select images from `GCKMediaMetadata` objects for display within the Google Cast framework."],["By default, the first image in the metadata is used, but apps can customize image selection via `GCKCastContext::imagePicker`."],["`getImageWithHints:fromMetadata:` method fetches a specific image type from the metadata based on provided hints."],["If no suitable image is found matching the desired type, this method will return `nil`."]]],["The `GCKUIImagePicker` protocol selects an image from `GCKMediaMetadata`. It has a default implementation that selects the first image. Custom implementations can be provided via `GCKCastContext::imagePicker`. The key method, `getImageWithHints:fromMetadata:`, retrieves an image based on `GCKUIImageHints` from provided metadata. It returns the selected `GCKImage` or `nil` if no suitable image is found. This enables picking specific image types for different purposes.\n"]]