GCKMediaControlChannel 클래스

GCKMediaControlChannel 클래스 참조

개요

미디어 제어 작업을 위한 GCKCastChannel 서브클래스입니다.

현재 활성 스트림에 적용되는 작업 (재생, 일시중지, 탐색, 중지 등)에는 유효한 (즉, nil이 아닌) 미디어 상태가 필요하며, 그렇지 않으면 kGCKInvalidRequestID이 반환되고 요청이 전송되지 않습니다. 미디어 상태는 채널이 연결될 때 자동으로 요청되며, 로드가 완료된 응답에 포함되고 언제든지 업데이트할 수 있습니다. 미디어 상태는 언제든지 nil이 될 수도 있습니다. 예를 들어 채널이 일시적으로 연결이 끊긴 경우에 발생합니다. 이 채널을 사용하는 경우 미디어 상태 변경사항은 mediaControlChannelDidUpdateStatus: (GCKMediaControlChannelDelegate-p) 콜백을 통해 모니터링해야 하며 스트림에서 작동하는 메서드는 미디어 상태가 nil이 아닌 동안에만 호출해야 합니다.

요청이 성공적으로 시작되면 해당 메서드는 요청에 할당된 요청 ID를 반환합니다. 요청을 시작할 수 없는 경우 메서드는 kGCKInvalidRequestID를 반환하고 실패 이유를 나타내도록 lastError 속성을 설정합니다. 요청이 성공적으로 시작되었지만 결국 실패하면 실패를 나타내기 위해 mediaControlChannel:requestDidFailWithID:error: (GCKMediaControlChannelDelegate-p) 콜백이 호출됩니다.

위임 프로토콜은 GCKMediaControlChannelDelegate를 참고하세요.

Deprecated:
GCKCastSessionGCKRemoteMediaClient 속성을 사용하여 미디어 재생을 제어합니다.

GCKCastChannel를 상속합니다.

인스턴스 메서드 요약

(instancetype) - init
 지정된 이니셜라이저입니다. 더보기
 
(NSInteger) - loadMedia:
 새 미디어 항목을 로드하고 재생을 시작합니다. 더보기
 
(NSInteger) - loadMedia:autoplay:
 새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다. 더보기
 
(NSInteger) - loadMedia:autoplay:playPosition:
 새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다. 더보기
 
(NSInteger) - loadMedia:autoplay:playPosition:customData:
 새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다. 더보기
 
(NSInteger) - loadMedia:autoplay:playPosition:activeTrackIDs:
 새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다. 더보기
 
(NSInteger) - loadMedia:autoplay:playPosition:activeTrackIDs:customData:
 새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다. 더보기
 
(NSInteger) - setActiveTrackIDs:
 활성 트랙을 설정합니다. 더보기
 
(NSInteger) - setTextTrackStyle:
 텍스트 트랙 스타일을 설정합니다. 더보기
 
(NSInteger) - pause
 현재 미디어 항목의 재생을 일시중지합니다. 더보기
 
(NSInteger) - pauseWithCustomData:
 현재 미디어 항목의 재생을 일시중지합니다. 더보기
 
(NSInteger) - stop
 현재 미디어 항목의 재생을 중지합니다. 더보기
 
(NSInteger) - stopWithCustomData:
 현재 미디어 항목의 재생을 중지합니다. 더보기
 
(NSInteger) - play
 현재 미디어 항목의 재생을 시작하거나 다시 시작합니다. 더보기
 
(NSInteger) - playWithCustomData:
 현재 미디어 항목의 재생을 시작하거나 다시 시작합니다. 더보기
 
(NSInteger) - seekToTimeInterval:
 현재 미디어 항목 내의 새 위치로 탐색합니다. 더보기
 
(NSInteger) - seekToTimeInterval:resumeState:
 현재 미디어 항목 내의 새 위치로 탐색합니다. 더보기
 
(NSInteger) - seekToTimeInterval:resumeState:customData:
 현재 미디어 항목 내의 새 위치로 탐색합니다. 더보기
 
(NSInteger) - queueLoadItems:startIndex:repeatMode:
 미디어 항목의 새 대기열을 로드하고 선택적으로 재생을 시작합니다. 더보기
 
(NSInteger) - queueLoadItems:startIndex:repeatMode:customData:
 미디어 항목의 새 대기열을 로드하고 선택적으로 재생을 시작합니다. 더보기
 
(NSInteger) - queueLoadItems:startIndex:playPosition:repeatMode:customData:
 미디어 항목의 새 대기열을 로드하고 선택적으로 재생을 시작합니다. 더보기
 
(NSInteger) - queueInsertItems:beforeItemWithID:
 새 미디어 항목 목록을 대기열에 삽입합니다. 더보기
 
(NSInteger) - queueInsertItems:beforeItemWithID:customData:
 새 미디어 항목 목록을 대기열에 삽입합니다. 더보기
 
(NSInteger) - queueInsertItem:beforeItemWithID:
 단일 항목을 대기열에 삽입하는 편의 메서드입니다. 더보기
 
(NSInteger) - queueInsertAndPlayItem:beforeItemWithID:
 단일 항목을 대기열에 삽입하고 현재 항목으로 만드는 편의 메서드입니다. 더보기
 
(NSInteger) - queueInsertAndPlayItem:beforeItemWithID:playPosition:customData:
 단일 항목을 대기열에 삽입하고 현재 항목으로 만드는 편의 메서드입니다. 더보기
 
(NSInteger) - queueUpdateItems:
 대기열을 업데이트합니다. 더보기
 
(NSInteger) - queueUpdateItems:customData:
 대기열을 업데이트합니다. 더보기
 
(NSInteger) - queueRemoveItemsWithIDs:
 대기열에서 미디어 항목 목록을 삭제합니다. 더보기
 
(NSInteger) - queueRemoveItemsWithIDs:customData:
 대기열에서 미디어 항목 목록을 삭제합니다. 더보기
 
(NSInteger) - queueRemoveItemWithID:
 대기열에서 단일 항목을 삭제하는 편의 메서드입니다. 더보기
 
(NSInteger) - queueReorderItemsWithIDs:insertBeforeItemWithID:
 대기열에 있는 미디어 항목 목록의 순서를 변경합니다. 더보기
 
(NSInteger) - queueReorderItemsWithIDs:insertBeforeItemWithID:customData:
 대기열에 있는 미디어 항목 목록의 순서를 변경합니다. 더보기
 
(NSInteger) - queueMoveItemWithID:beforeItemWithID:
 큐에서 단일 항목을 이동하는 편의 메서드입니다. 더보기
 
(NSInteger) - queueJumpToItemWithID:
 대기열에서 지정된 ID가 있는 항목으로 건너뜁니다. 더보기
 
(NSInteger) - queueJumpToItemWithID:customData:
 대기열에서 지정된 ID가 있는 항목으로 건너뜁니다. 더보기
 
(NSInteger) - queueJumpToItemWithID:playPosition:customData:
 대기열에서 지정된 ID가 있는 항목으로 건너뜁니다. 더보기
 
(NSInteger) - queueNextItem
 대기열의 다음 항목으로 이동합니다. 더보기
 
(NSInteger) - queuePreviousItem
 대기열의 이전 항목으로 이동합니다. 더보기
 
(NSInteger) - queueSetRepeatMode:
 대기열 반복 모드를 설정합니다. 더보기
 
(NSInteger) - setStreamVolume:
 스트림 볼륨을 설정합니다. 더보기
 
(NSInteger) - setStreamVolume:customData:
 스트림 볼륨을 설정합니다. 더보기
 
(NSInteger) - setStreamMuted:
 스트림이 음소거되었는지 여부를 설정합니다. 더보기
 
(NSInteger) - setStreamMuted:customData:
 스트림이 음소거되었는지 여부를 설정합니다. 더보기
 
(NSInteger) - requestStatus
 수신기에서 업데이트된 미디어 상태 정보를 요청합니다. 더보기
 
(NSTimeInterval) - approximateStreamPosition
 마지막으로 수신된 스트림 정보와 업데이트 이후 경과된 실제 시간을 기준으로 계산된 대략적인 스트림 위치를 반환합니다. 더보기
 
(BOOL) - cancelRequestWithID:
 진행 중인 요청을 취소합니다. 더보기
 
(instancetype) - initWithNamespace:
 지정된 이니셜라이저입니다. 더보기
 
(void) - didReceiveTextMessage:
 이 채널에서 문자 메시지를 수신했을 때 호출됩니다. 더보기
 
(BOOL) - sendTextMessage:
 이 채널에서 문자 메시지를 전송합니다. 더보기
 
(BOOL) - sendTextMessage:error:
 이 채널에서 문자 메시지를 전송합니다. 더보기
 
(NSInteger) - generateRequestID
 새 메시지의 요청 ID를 생성합니다. 더보기
 
(NSNumber *__nullable) - generateRequestNumber
 generateRequestID의 결과를 NSNumber로 래핑하는 편의 메서드입니다. 더보기
 
(void) - didConnect
 이 채널이 연결되었을 때 호출됩니다. 이제 이 채널을 통해 Cast 기기와 메시지를 교환할 수 있음을 나타냅니다. 더보기
 
(void) - didDisconnect
 이 채널이 연결 해제되었을 때 호출됩니다. 이 채널을 통해 더 이상 Cast 기기와 메시지를 교환할 수 없음을 나타냅니다. 더보기
 

숙박 시설 요약

GCKMediaStatusmediaStatus
 현재 로드된 미디어의 미디어 상태입니다(있는 경우). 그렇지 않으면 nil입니다. 더보기
 
NSTimeInterval timeSinceLastMediaStatusUpdate
 마지막 미디어 상태 업데이트가 수신된 후 경과된 시간입니다. 더보기
 
GCKErrorlastError
 마지막 요청의 오류 세부정보(있는 경우) 또는 마지막 요청이 성공한 경우 nil 더보기
 
id< GCKMediaControlChannelDelegatedelegate
 채널 상태 변경에 관한 알림을 수신하는 대리자입니다. 더보기
 
NSString * protocolNamespace
 채널의 네임스페이스입니다. 더보기
 
BOOL isConnected
 이 채널이 현재 연결되어 있는지 여부를 나타내는 플래그입니다. 더보기
 
GCKDeviceManagerdeviceManager
 이 채널이 등록된 기기 관리자입니다(있는 경우). 더보기
 

메소드 세부정보

- (instancetype) init

지정된 이니셜라이저입니다.

GCKCastChannel를 구현합니다.

- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo

새 미디어 항목을 로드하고 재생을 시작합니다.

Parameters
mediaInfoAn object describing the media item to load.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay 

새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다.

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition 

새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다.

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
customData: (id __nullable)  customData 

새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다.

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs 

새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다.

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
activeTrackIDsAn array of integers specifying the active tracks. May be nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

새 미디어 항목을 로드하고 선택적으로 재생을 시작합니다.

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
activeTrackIDsAn array of integers specifying the active tracks. May be nil.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) setActiveTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs

활성 트랙을 설정합니다.

현재 미디어 상태가 없으면 요청이 실패합니다.

Parameters
activeTrackIDsAn array of integers specifying the active tracks.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID 활성 트랙을 빈 목록으로 설정하기 위해 nil 또는 빈 배열일 수 있습니다.
- (NSInteger) setTextTrackStyle: (GCKMediaTextTrackStyle *__nullable)  textTrackStyle

텍스트 트랙 스타일을 설정합니다.

현재 미디어 상태가 없으면 요청이 실패합니다.

Parameters
textTrackStyleThe text track style. The style will not be changed if this is nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) pause

현재 미디어 항목의 재생을 일시중지합니다.

현재 미디어 상태가 없으면 요청이 실패합니다.

반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) pauseWithCustomData: (id __nullable)  customData

현재 미디어 항목의 재생을 일시중지합니다.

현재 미디어 상태가 없으면 요청이 실패합니다.

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) stop

현재 미디어 항목의 재생을 중지합니다.

현재 미디어 상태가 없으면 요청이 실패합니다. 현재 로드된 대기열이 있으면 삭제됩니다.

반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) stopWithCustomData: (id __nullable)  customData

현재 미디어 항목의 재생을 중지합니다.

현재 미디어 상태가 없으면 요청이 실패합니다. 현재 로드된 대기열이 있으면 삭제됩니다.

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) play

현재 미디어 항목의 재생을 시작하거나 다시 시작합니다.

재생은 항상 스트림의 시작 부분에서 시작됩니다. 현재 미디어 상태가 없으면 요청이 실패합니다.

반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) playWithCustomData: (id __nullable)  customData

현재 미디어 항목의 재생을 시작하거나 다시 시작합니다.

재생은 항상 스트림의 시작 부분에서 시작됩니다. 현재 미디어 상태가 없으면 요청이 실패합니다.

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) seekToTimeInterval: (NSTimeInterval)  position

현재 미디어 항목 내의 새 위치로 탐색합니다.

현재 미디어 상태가 없으면 요청이 실패합니다.

Parameters
positionThe new position from the beginning of the stream.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaControlChannelResumeState resumeState 

현재 미디어 항목 내의 새 위치로 탐색합니다.

현재 미디어 상태가 없으면 요청이 실패합니다.

Parameters
positionThe new position interval from the beginning of the stream.
resumeStateThe action to take after the seek operation has finished.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaControlChannelResumeState resumeState
customData: (id __nullable)  customData 

현재 미디어 항목 내의 새 위치로 탐색합니다.

현재 미디어 상태가 없으면 요청이 실패합니다.

Parameters
positionThe new position from the beginning of the stream.
resumeStateThe action to take after the seek operation has finished.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: (GCKMediaRepeatMode repeatMode 

미디어 항목의 새 대기열을 로드하고 선택적으로 재생을 시작합니다.

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
repeatModeThe repeat mode for playing the queue.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: (GCKMediaRepeatMode repeatMode
customData: (id __nullable)  customData 

미디어 항목의 새 대기열을 로드하고 선택적으로 재생을 시작합니다.

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
repeatModeThe repeat mode for playing the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
playPosition: (NSTimeInterval)  playPosition
repeatMode: (GCKMediaRepeatMode repeatMode
customData: (id __nullable)  customData 

미디어 항목의 새 대기열을 로드하고 선택적으로 재생을 시작합니다.

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
playPositionThe initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
repeatModeThe repeat mode for playing the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueInsertItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
beforeItemWithID: (NSUInteger)  beforeItemID 

새 미디어 항목 목록을 대기열에 삽입합니다.

Parameters
queueItemsAn array of GCKMediaQueueItem instances to insert. Must not be nil or empty.
beforeItemIDThe ID of the item that will be located immediately after the inserted list. If the value is kGCKMediaQueueInvalidItemID, the inserted list will be appended to the end of the queue.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueInsertItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
beforeItemWithID: (NSUInteger)  beforeItemID
customData: (id __nullable)  customData 

새 미디어 항목 목록을 대기열에 삽입합니다.

Parameters
queueItemsAn array of GCKMediaQueueItem instances to insert. Must not be nil or empty.
beforeItemIDID of the item that will be located immediately after the inserted list. If the value is kGCKMediaQueueInvalidItemID, the inserted list will be appended to the end of the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueInsertItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID 

단일 항목을 대기열에 삽입하는 편의 메서드입니다.

Parameters
itemThe item to insert.
beforeItemIDThe ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueInsertAndPlayItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID 

단일 항목을 대기열에 삽입하고 현재 항목으로 만드는 편의 메서드입니다.

Parameters
itemThe item to insert.
beforeItemIDThe ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueInsertAndPlayItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID
playPosition: (NSTimeInterval)  playPosition
customData: (id __nullable)  customData 

단일 항목을 대기열에 삽입하고 현재 항목으로 만드는 편의 메서드입니다.

Parameters
itemThe item to insert.
beforeItemIDThe ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
playPositionThe initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueUpdateItems: (NSArray< GCKMediaQueueItem * > *)  queueItems

대기열을 업데이트합니다.

Parameters
queueItemsThe list of updated items.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueUpdateItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
customData: (id __nullable)  customData 

대기열을 업데이트합니다.

Parameters
queueItemsThe list of updated items.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueRemoveItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs

대기열에서 미디어 항목 목록을 삭제합니다.

그 결과 대기열이 비게 되면 현재 미디어 세션이 종료됩니다.

Parameters
itemIDsAn array of media item IDs identifying the items to remove. Must not be nil or empty.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueRemoveItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs
customData: (id __nullable)  customData 

대기열에서 미디어 항목 목록을 삭제합니다.

그 결과 대기열이 비게 되면 현재 미디어 세션이 종료됩니다.

Parameters
itemIDsAn array of media item IDs identifying the items to remove. Must not be nil or empty.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueRemoveItemWithID: (NSUInteger)  itemID

대기열에서 단일 항목을 삭제하는 편의 메서드입니다.

Parameters
itemIDThe ID of the item to remove.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueReorderItemsWithIDs: (NSArray< NSNumber * > *)  queueItemIDs
insertBeforeItemWithID: (NSUInteger)  beforeItemID 

대기열에 있는 미디어 항목 목록의 순서를 변경합니다.

Parameters
queueItemIDsAn array of media item IDs identifying the items to reorder. Must not be nil or empty.
beforeItemIDID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the reordered list will be appended at the end of the queue.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueReorderItemsWithIDs: (NSArray< NSNumber * > *)  queueItemIDs
insertBeforeItemWithID: (NSUInteger)  beforeItemID
customData: (id __nullable)  customData 

대기열에 있는 미디어 항목 목록의 순서를 변경합니다.

Parameters
queueItemIDsAn array of media item IDs identifying the items to reorder. Must not be nil or empty.
beforeItemIDThe ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the reordered list will be moved to the end of the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueMoveItemWithID: (NSUInteger)  itemID
beforeItemWithID: (NSUInteger)  beforeItemID 

큐에서 단일 항목을 이동하는 편의 메서드입니다.

Parameters
itemIDThe ID of the item to move.
beforeItemIDThe ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the item will be moved to the end of the queue.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueJumpToItemWithID: (NSUInteger)  itemID

대기열에서 지정된 ID가 있는 항목으로 건너뜁니다.

Parameters
itemIDThe ID of the item to jump to.
반환 값
이 요청의 요청 ID입니다. 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueJumpToItemWithID: (NSUInteger)  itemID
customData: (id __nullable)  customData 

대기열에서 지정된 ID가 있는 항목으로 건너뜁니다.

Parameters
itemIDThe ID of the item to jump to.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueJumpToItemWithID: (NSUInteger)  itemID
playPosition: (NSTimeInterval)  playPosition
customData: (id __nullable)  customData 

대기열에서 지정된 ID가 있는 항목으로 건너뜁니다.

Parameters
itemIDThe ID of the item to jump to.
playPositionThe initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
이 요청의 요청 ID입니다. 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueNextItem

대기열의 다음 항목으로 이동합니다.

반환 값
이 요청의 요청 ID입니다. 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queuePreviousItem

대기열의 이전 항목으로 이동합니다.

반환 값
이 요청의 요청 ID입니다. 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID입니다.
- (NSInteger) queueSetRepeatMode: (GCKMediaRepeatMode repeatMode

대기열 반복 모드를 설정합니다.

Parameters
repeatModeThe new repeat mode.
반환 값
이 요청의 요청 ID입니다. 메시지를 전송할 수 없거나 매개변수가 잘못된 경우 kGCKInvalidRequestID입니다.
- (NSInteger) setStreamVolume: (float)  volume

스트림 볼륨을 설정합니다.

현재 미디어 세션이 없으면 요청이 실패합니다.

Parameters
volumeThe new volume, in the range [0.0 - 1.0].
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) setStreamVolume: (float)  volume
customData: (id __nullable)  customData 

스트림 볼륨을 설정합니다.

현재 미디어 세션이 없으면 요청이 실패합니다.

Parameters
volumeThe new volume, in the range [0.0 - 1.0].
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) setStreamMuted: (BOOL)  muted

스트림이 음소거되었는지 여부를 설정합니다.

현재 미디어 세션이 없으면 요청이 실패합니다.

Parameters
mutedWhether the stream should be muted or unmuted.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) setStreamMuted: (BOOL)  muted
customData: (id __nullable)  customData 

스트림이 음소거되었는지 여부를 설정합니다.

현재 미디어 세션이 없으면 요청이 실패합니다.

Parameters
mutedWhether the stream should be muted or unmuted.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSInteger) requestStatus

수신기에서 업데이트된 미디어 상태 정보를 요청합니다.

반환 값
요청 ID 또는 메시지를 보낼 수 없는 경우 kGCKInvalidRequestID
- (NSTimeInterval) approximateStreamPosition

마지막으로 수신된 스트림 정보와 업데이트 이후 경과된 실제 시간을 기준으로 계산된 대략적인 스트림 위치를 반환합니다.

채널이 연결되지 않았거나 현재 로드된 미디어가 없는 경우 0을 반환합니다.

- (BOOL) cancelRequestWithID: (NSInteger)  requestID

진행 중인 요청을 취소합니다.

요청을 취소해도 요청이 실행되지 않는 것은 아닙니다. 호출 애플리케이션이 더 이상 요청 결과에 관심이 없음을 나타내므로 요청 추적과 연결된 모든 상태가 삭제됩니다.

Parameters
requestIDThe ID of the request to cancel.
반환 값
요청이 취소된 경우
YES, 지정된 ID로 추적되는 요청이 없는 경우 NO
- (instancetype) initWithNamespace: (NSString *)  protocolNamespace

지정된 이니셜라이저입니다.

지정된 네임스페이스로 새 GCKCastChannel를 생성합니다.

Parameters
protocolNamespaceThe namespace.

GCKGenericChannel에 구현되었습니다.

- (void) didReceiveTextMessage: (NSString *)  message

이 채널에서 문자 메시지를 수신했을 때 호출됩니다.

기본 구현은 no-op입니다.

Parameters
messageThe message.
- (BOOL) sendTextMessage: (NSString *)  message

이 채널에서 문자 메시지를 전송합니다.

Parameters
messageThe message.
반환 값
성공 시
YES, 메시지를 보낼 수 없는 경우 (채널이 연결되지 않았거나 현재 전송 버퍼가 너무 가득 차서) NO를 반환합니다.
Deprecated:
자세한 오류 정보를 제공하는 sendTextMessage:error:를 사용하세요.
- (BOOL) sendTextMessage: (NSString *)  message
error: (GCKError *__nullable *__nullable)  error 

이 채널에서 문자 메시지를 전송합니다.

Parameters
messageThe message.
errorA pointer at which to store the error result. May be nil.
반환 값
성공 시
YES, 메시지를 보낼 수 없는 경우 NO
- (NSInteger) generateRequestID

새 메시지의 요청 ID를 생성합니다.

반환 값
생성된 ID 또는 채널이 현재 연결되어 있지 않은 경우 kGCKInvalidRequestID
- (NSNumber * __nullable) generateRequestNumber

generateRequestID의 결과를 NSNumber로 래핑하는 편의 메서드입니다.

반환 값
생성된 ID 또는 채널이 현재 연결되어 있지 않은 경우 nil
- (void) didConnect

이 채널이 연결되었을 때 호출됩니다. 이제 이 채널을 통해 Cast 기기와 메시지를 교환할 수 있음을 나타냅니다.

기본 구현은 no-op입니다.

- (void) didDisconnect

이 채널이 연결 해제되었을 때 호출됩니다. 이 채널을 통해 더 이상 Cast 기기와 메시지를 교환할 수 없음을 나타냅니다.

기본 구현은 no-op입니다.

숙박 시설 세부정보

- (GCKMediaStatus*) mediaStatus
readnonatomicstrong

현재 로드된 미디어의 미디어 상태입니다(있는 경우). 그렇지 않으면 nil입니다.

- (NSTimeInterval) timeSinceLastMediaStatusUpdate
readnonatomicassign

마지막 미디어 상태 업데이트가 수신된 후 경과된 시간입니다.

상태 요청이 현재 진행 중인 경우 0입니다.

- (GCKError*) lastError
readnonatomiccopy

마지막 요청의 오류 세부정보(있는 경우) 또는 마지막 요청이 성공한 경우 nil

- (id<GCKMediaControlChannelDelegate>) delegate
readwritenonatomicweak

채널 상태 변경에 관한 알림을 수신하는 대리자입니다.

- (NSString*) protocolNamespace
readnonatomiccopyinherited

채널의 네임스페이스입니다.

- (BOOL) isConnected
readnonatomicassigninherited

이 채널이 현재 연결되어 있는지 여부를 나타내는 플래그입니다.

- (GCKDeviceManager*) deviceManager
readnonatomicweakinherited

이 채널이 등록된 기기 관리자입니다(있는 경우).

Deprecated:
이 채널이 지원 중단된 GCKDeviceManager 클래스에 등록되지 않은 경우 nil이 됩니다.