AI-generated Key Takeaways
-
GCKUIImagePicker
is a protocol used for selecting images fromGCKMediaMetadata
for display in the Google Cast user interface. -
A default implementation selects the first image from the metadata, but applications can provide a custom implementation for more nuanced image selection.
-
The
getImageWithHints:fromMetadata:
method is the core functionality, allowing developers to retrieve an image based on specified criteria (hints) from the metadata. -
By setting the
GCKCastContext::imagePicker
property, developers can customize how images are selected for their Cast application's UI elements.
Overview
An object used for selecting an image for a given purpose from a GCKMediaMetadata object.
A default implementation is used internally by the framework which always selects the first image from the metadata for all uses. The application can provide a custom implementation by setting the GCKCastContext::imagePicker property.
- Since
- 3.0
Inherits <NSObject>.
Instance Method Summary | |
(GCKImage *__nullable) | - getImageWithHints:fromMetadata: |
Returns an image of the specified type from the media metadata. More... | |
Method Detail
- (GCKImage * __nullable) getImageWithHints: | (GCKUIImageHints *) | imageHints | |
fromMetadata: | (const GCKMediaMetadata *) | metadata | |
Returns an image of the specified type from the media metadata.
- Parameters
-
imageHints The hints about how to pick the image. metadata The media metadata to pick from.
- Returns
- The selected image, or
nil
if there is no appropriate image for the requested type.