GCKMediaQueueItem クラス

GCKMediaQueueItem クラス リファレンス

概要

メディアキュー アイテムを表すクラス。

このオブジェクトのインスタンスは不変です。

このクラスは、送信側アプリと受信側アプリ間の双方向通信で使用されます。送信側は、レシーバー アプリケーションにメディア アイテムのリストを読み込むか挿入するために、これらを構築します。レシーバーの GCKMediaStatus には、このクラスのインスタンスとして表されるアイテムのリストも含まれています。

読み込みが完了すると、同じメディアが複数回読み込まれた場合でも、レシーバーは各 GCKMediaQueueItem に一意のアイテム ID を割り当てます。

NSObject を継承します。<NSCopying> を実装します。

インスタンス メソッドの概要

(instancetype) - initWithMediaInformation:autoplay:startTime:preloadTime:activeTrackIDs:customData:
 指定された属性で新しい GCKMediaQueueItem を作成します。詳細...
 
(instancetype) - initWithMediaInformation:autoplay:startTime:playbackDuration:preloadTime:activeTrackIDs:customData:
 指定イニシャライザ。詳細...
 
(void) - clearItemID
 アイテム ID をクリア(割り当て解除)します。詳細...
 
(instancetype) - mediaQueueItemModifiedWithBlock:
 指定されたブロックによって変更されたこの GCKMediaQueueItem のコピーを返します。詳細...
 

プロパティの概要

GCKMediaInformationmediaInformation
 このアイテムに関連付けられたメディア情報。詳細...
 
NSUInteger itemID
 アイテム ID。まだ割り当てられていない場合は kGCKMediaQueueInvalidItemID詳細...
 
BOOL autoplay
 キューの現在のアイテムになったときに、アイテムの再生を自動的に開始するかどうか。詳細...
 
NSTimeInterval startTime
 アイテムの開始時間(秒単位)。詳細...
 
NSTimeInterval playbackDuration
 アイテムの再生時間(秒単位)。ストリームの実際の時間を使用する場合は INFINITY詳細...
 
NSTimeInterval preloadTime
 受信側がこのアイテムのプリロードを開始するまでの、前のアイテムの終了までの時間(秒単位)。詳細...
 
NSArray< NSNumber * > * activeTrackIDs
 このアイテムのアクティブなトラック ID。詳細...
 
id customData
 この項目に関連付けられたカスタムデータ(存在する場合)。詳細...
 

メソッドの詳細

- (instancetype) initWithMediaInformation: (GCKMediaInformation *)  mediaInformation
autoplay: (BOOL)  autoplay
startTime: (NSTimeInterval)  startTime
preloadTime: (NSTimeInterval)  preloadTime
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

指定された属性で新しい GCKMediaQueueItem を作成します。

詳しくは、対応するプロパティのドキュメントをご覧ください。

Parameters
mediaInformationThe media information for the item.
autoplayThe autoplay state for this item.
startTimeThe start time of the item, in seconds. May be kGCKInvalidTimeInterval if this item refers to a live stream or if the default start time should be used.
preloadTimeThe preload time for the item, in seconds. May be kGCKInvalidTimeInterval to indicate no preload time.
activeTrackIDsThe active track IDs for the item. May be nil.
customDataAny custom data to associate with the item. May be nil.
- (instancetype) initWithMediaInformation: (GCKMediaInformation *)  mediaInformation
autoplay: (BOOL)  autoplay
startTime: (NSTimeInterval)  startTime
playbackDuration: (NSTimeInterval)  playbackDuration
preloadTime: (NSTimeInterval)  preloadTime
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

指定イニシャライザ。

指定された属性で新しい GCKMediaQueueItem を作成します。詳しくは、対応するプロパティのドキュメントをご覧ください。

Parameters
mediaInformationThe media information for the item.
autoplayThe autoplay state for this item.
startTimeThe start time of the item, in seconds. May be kGCKInvalidTimeInterval if this item refers to a live stream or if the default start time should be used.
playbackDurationThe playback duration of the item, in seconds. May be kGCKInvalidTimeInterval to indicate no preload time.
preloadTimeThe preload time for the item, in seconds.
activeTrackIDsThe active track IDs for the item. May be nil.
customDataAny custom data to associate with the item. May be nil.
- (void) clearItemID

アイテム ID をクリア(割り当て解除)します。

既存のインスタンスを再利用するために呼び出す必要があります(キューに戻す場合など)。

- (instancetype) mediaQueueItemModifiedWithBlock: (void(^)(GCKMediaQueueItemBuilder *builder))  block

指定されたブロックによって変更されたこの GCKMediaQueueItem のコピーを返します。

Parameters
blockA block that receives a GCKMediaQueueItemBuilder which can be used to modify attributes of the copy. It is not necessary to call the builder's build (GCKMediaQueueItemBuilder) method within the block, as this method will do that automatically when the block completes.
戻り値
このアイテムの変更されたコピー。

プロパティの詳細

- (GCKMediaInformation*) mediaInformation
readnonatomicstrong

このアイテムに関連付けられたメディア情報。

- (NSUInteger) itemID
readnonatomicassign

アイテム ID。まだ割り当てられていない場合は kGCKMediaQueueInvalidItemID

- (BOOL) autoplay
readnonatomicassign

キューの現在のアイテムになったときに、アイテムの再生を自動的に開始するかどうか。

NO の場合、キューはこのアイテムに達すると一時停止します。デフォルト値は YES です。

- (NSTimeInterval) startTime
readnonatomicassign

アイテムの開始時間(秒単位)。

デフォルト値は kGCKInvalidTimeInterval で、開始時刻が設定されていないことを示します。

- (NSTimeInterval) playbackDuration
readnonatomicassign

アイテムの再生時間(秒単位)。ストリームの実際の時間を使用する場合は INFINITY

- (NSTimeInterval) preloadTime
readnonatomicassign

受信側がこのアイテムのプリロードを開始するまでの、前のアイテムの終了までの時間(秒単位)。

デフォルト値は kGCKInvalidTimeInterval で、プリロード時間が設定されていないことを示します。

- (NSArray<NSNumber *>*) activeTrackIDs
readnonatomicstrong

このアイテムのアクティブなトラック ID。

- (id) customData
readnonatomicstrong

この項目に関連付けられたカスタムデータ(存在する場合)。