AI-generated Key Takeaways
-
GCKUIImagePicker
protocol helps select images fromGCKMediaMetadata
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
.
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 | |
(nullable GCKImage *) | - getImageWithHints:fromMetadata: |
Returns an image of the specified type from the media metadata. More... | |
Method Detail
- (nullable GCKImage *) 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.