GCKCastOptions クラス
キャスト デバイスの検出とキャスト セッションの動作に影響するオプション。
このオブジェクトを GCKCastContext に渡す前に、書き込み可能なプロパティを設定する必要があります。
- 開始:
- 3.0
NSObject、<NSCopying>、<NSSecureCoding> を継承します。
指定された検出基準で、新しい GCKCastOptions オブジェクトを作成します。
- Parameters
-
discoveryCriteria | The discovery criteria to apply to discovered Cast devices. Only those devices that satisfy the criteria will be made available to the application. |
- 開始:
- 4.0
- (instancetype) initWithReceiverApplicationID: |
|
(NSString *) |
applicationID |
|
指定されたレシーバー アプリケーション ID で新しい GCKCastOptions オブジェクトを作成します。
- Parameters
-
applicationID | The ID of the receiver application which must be supported by discovered Cast devices, and which will be launched when starting a new Cast session. |
- Deprecated:
- initWithDiscoveryCriteria: を使用します。
- (instancetype) initWithSupportedNamespaces: |
|
(NSArray< NSString * > *) |
namespaces |
|
指定された Namespace のリストを使用して新しい GCKCastOptions オブジェクトを作成します。
- Parameters
-
namespaces | A list of namespaces which must be supported by the currently running receiver application on each discovered Cast device. |
- Deprecated:
- initWithDiscoveryCriteria: を使用します。
- (BOOL) physicalVolumeButtonsWillControlDeviceVolume |
|
readwritenonatomicassign |
送信側デバイスの物理的な音量ボタンでセッションの音量を調節する必要があるかどうかを示すフラグ。
- (BOOL) disableDiscoveryAutostart |
|
readwritenonatomicassign |
- (BOOL) disableAnalyticsLogging |
|
readwritenonatomicassign |
診断データの収集を無効または有効にして、キャスト デバイスが検出される際の信頼性を高めるフラグです。
デフォルト値は NO
(有効)です。無効にするには、値を YES
に設定します。
- 開始:
- 4.0
キャスト セッションの開始時に使用するレシーバ起動オプション。
- (NSString*) sharedContainerIdentifier |
|
readwritenonatomiccopy |
フレームワークによって実行されるバックグラウンド HTTP ダウンロードに使用する共有コンテナ ID。
- 開始:
- 3.2
- (BOOL) suspendSessionsWhenBackgrounded |
|
readwritenonatomicassign |
送信側アプリがバックグラウンドに移行するときにセッションを一時停止する(フォアグラウンドに戻ったときに再開する)かどうかを指定します。
このオプションはデフォルトで YES
に設定されています。バックグラウンドでネットワーク接続を無期限に維持できるアプリでは、これを NO
に設定することをおすすめします。
- 開始:
- 3.4
- (BOOL) stopReceiverApplicationWhenEndingSession |
|
readwritenonatomicassign |
ユーザーが [キャストを停止] ボタンを使用してセッションを終了したときに、レシーバー アプリを終了するかどうかを指定します。
このオプションはデフォルトで NO
に設定されています。
- 開始:
- 4.0
- (BOOL) startDiscoveryAfterFirstTapOnCastButton |
|
readwritenonatomicassign |
ユーザーが初めて GCKUICastButton
をタップした後にのみキャスト デバイスの検出を開始するかどうかを指定します。
YES
に設定すると、ユーザーが初めてキャスト アイコンをタップするまで GCKUICastButton
が表示されます。最初のタップでインタースティシャルが表示され、キャストを機能させるためにローカル ネットワークへのアクセス権限が必要な理由を説明します。インタースティシャルを閉じると、ファインド広告が開始されます。キャスト アイコンは、デバイスが Wi-Fi ネットワークに接続されている場合のみ再び表示されます。Wi-Fi ネットワークに接続されていない場合、キャスト アイコンは表示されません。NO
に設定すると、disableDiscoveryAutoStart
フラグに基づいて検出が開始されます。このフラグは、disableDiscoveryAutoStart
フラグが NO
に設定されている場合のみ、iOS 14 以降で有効になります。デフォルト値は YES
です。
- 開始:
- 4.5.3
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-12-02 UTC。
[null,null,["最終更新日 2023-12-02 UTC。"],[[["GCKCastOptions manages the discovery of Cast devices and Cast session behavior, with writable properties needing configuration before use."],["It offers various options, including controlling session volume with device buttons, managing discovery timing, and handling session suspension and receiver application termination."],["Developers can specify discovery criteria, receiver application ID, and supported namespaces to refine the Cast device selection process."],["GCKCastOptions also allows customization of launch options, background downloads, and the behavior of the Cast button on iOS 14 and above."],["It's worth noting that some initialization methods using receiver application ID or supported namespaces are deprecated in favor of using discovery criteria for more flexibility."]]],["The GCKCastOptions class configures Cast device discovery and session behavior. Key actions include: constructing options with discovery criteria, receiver application ID, or namespaces; setting flags to control session volume with physical buttons, manage discovery autostart, enable/disable diagnostic data collection, and suspend sessions when backgrounded. It also specifies receiver launch options, shared container identifiers, terminating the receiver app on session end, and initiating device discovery on the first Cast button tap. These writable properties must be configured prior to use.\n"]]