GCKCastOptions 클래스
Cast 기기 검색 및 Cast 세션의 동작에 영향을 미치는 옵션입니다.
이 객체를 GCKCastContext에 전달하기 전에 쓰기 가능한 속성을 설정해야 합니다.
- 다음 이후:
- 3.0
NSObject, <NS copy> 및 <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 |
|
지정된 네임스페이스 목록으로 새 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 |
Cast 기기 검색의 안정성을 개선하기 위해 진단 데이터 수집을 사용 중지하거나 사용 설정하는 데 사용되는 플래그입니다.
기본값은 NO
(사용 설정됨)이며 값을 YES
로 설정하여 사용 중지할 수 있습니다.
- 다음 이후:
- 4.0
Cast 세션을 시작할 때 사용할 수신기 실행 옵션입니다.
- (NSString*) sharedContainerIdentifier |
|
readwritenonatomiccopy |
프레임워크에서 실행하는 백그라운드 HTTP 다운로드에 사용할 공유 컨테이너 식별자입니다.
- 다음 이후:
- 3.2
- (BOOL) suspendSessionsWhenBackgrounded |
|
readwritenonatomicassign |
발신기 애플리케이션이 백그라운드로 전환될 때 세션을 정지하고 포그라운드로 돌아올 때 세션을 재개해야 하는지 여부입니다.
이 옵션은 기본적으로 YES
로 설정됩니다. 백그라운드에서 네트워크 연결을 무기한 유지할 수 있는 애플리케이션에서는 이를 NO
로 설정하는 것이 좋습니다.
- 다음 이후:
- 3.4
- (BOOL) stopReceiverApplicationWhenEndingSession |
|
readwritenonatomicassign |
사용자가 '전송 중지' 버튼으로 세션을 종료할 때 수신기 애플리케이션을 종료할지 여부입니다.
이 옵션은 기본적으로 NO
로 설정됩니다.
- 다음 이후:
- 4.0
- (BOOL) startDiscoveryAfterFirstTapOnCastButton |
|
readwritenonatomicassign |
사용자가 GCKUICastButton
를 처음 탭한 후에만 Cast 기기 검색을 시작할지 여부입니다.
YES
로 설정하면 사용자가 전송 버튼을 처음 탭할 때까지 GCKUICastButton
가 표시됩니다. 한 번 탭하면 전송이 작동하는 데 로컬 네트워크 액세스 권한이 필요한 이유를 설명하는 전면 광고가 표시됩니다. 전면 광고를 닫으면 검색이 시작됩니다. 기기가 Wi-Fi 네트워크에 연결된 경우에만 전송 버튼이 다시 표시됩니다. Wi-Fi 네트워크에 연결되어 있지 않으면 전송 버튼이 숨겨집니다. NO
로 설정하면 disableDiscoveryAutoStart
플래그를 기준으로 검색이 시작됩니다. 이 플래그는 disableDiscoveryAutoStart
플래그가 NO
로 설정된 경우 iOS 14 이상에서만 적용됩니다. 기본값은 YES
입니다.
- 다음 이후:
- 4.5.3
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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"]]