<GCKUIImagePicker> プロトコル
GCKMediaMetadata オブジェクトから特定の目的の画像を選択するために使用するオブジェクト。
デフォルトの実装はフレームワークによって内部的に使用されます。フレームワークは、あらゆる用途において常にメタデータから最初の画像を選択します。アプリケーションでカスタム実装を提供するには、GCKCastContext::imagePicker プロパティを設定します。
- 開始:
- 3.0
<NSObject> を継承します。
メディア メタデータから指定されたタイプの画像を返します。
- Parameters
-
imageHints | The hints about how to pick the image. |
metadata | The media metadata to pick from. |
- 戻り値
- 選択された画像。リクエストされたタイプに適した画像がない場合は
nil
。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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"]]