AI-generated Key Takeaways
-
The
GCKMediaQueueItemBuilder
class is used to construct new or modify existingGCKMediaQueueItem
instances, which represent items in a media queue. -
It provides methods to set properties like media information, autoplay, start time, playback duration, preload time, active track IDs, and custom data.
-
Developers can derive a new
GCKMediaQueueItem
from an existing one by modifying its attributes using the builder. -
Alternatively, a new
GCKMediaQueueItem
can be built from scratch by setting all desired properties through the builder's methods. -
Finally, the
build
method is called to create the actualGCKMediaQueueItem
instance based on the builder's current configuration.
Overview
A builder object for constructing new or derived GCKMediaQueueItem instances.
The builder may be used to derive a GCKMediaQueueItem from an existing one:
It can also be used to construct a new GCKMediaQueueItem from scratch:
Inherits NSObject.
Instance Method Summary | |
(instancetype) | - init |
Constructs a new GCKMediaQueueItemBuilder with attributes initialized to default values. More... | |
(instancetype) | - initWithMediaQueueItem: |
Constructs a new GCKMediaQueueItemBuilder with attributes copied from the given GCKMediaQueueItem, including the item ID. More... | |
(GCKMediaQueueItem *) | - build |
Builds a GCKMediaQueueItem using the builder's current attributes. More... | |
Property Summary | |
GCKMediaInformation * | mediaInformation |
The media information associated with this item. More... | |
BOOL | autoplay |
Whether the item should automatically start playback when it becomes the current item in the queue. More... | |
NSTimeInterval | startTime |
The start time of the item, in seconds. More... | |
NSTimeInterval | playbackDuration |
The playback duration for the item, in seconds, or INFINITY if the stream's actual duration should be used. More... | |
NSTimeInterval | preloadTime |
How long before the previous item ends, in seconds, before the receiver should start preloading this item. More... | |
NSArray< NSNumber * > * | activeTrackIDs |
The active track IDs for this item. More... | |
id | customData |
The custom data associated with this item, if any. More... | |
Method Detail
- (instancetype) init |
Constructs a new GCKMediaQueueItemBuilder with attributes initialized to default values.
- (instancetype) initWithMediaQueueItem: | (GCKMediaQueueItem *__nullable) | item |
Constructs a new GCKMediaQueueItemBuilder with attributes copied from the given GCKMediaQueueItem, including the item ID.
- Parameters
-
item The item to copy.
- (GCKMediaQueueItem *) build |
Builds a GCKMediaQueueItem using the builder's current attributes.
Property Detail
|
readwritenonatomiccopy |
The media information associated with this item.
|
readwritenonatomicassign |
Whether the item should automatically start playback when it becomes the current item in the queue.
If NO
, the queue will pause when it reaches this item. The default value is YES
.
|
readwritenonatomicassign |
The start time of the item, in seconds.
The default value is kGCKInvalidTimeInterval, indicating that a start time does not apply (for example, for a live stream) or that the default start time should be used.
|
readwritenonatomicassign |
The playback duration for the item, in seconds, or INFINITY
if the stream's actual duration should be used.
|
readwritenonatomicassign |
How long before the previous item ends, in seconds, before the receiver should start preloading this item.
The default value is kGCKInvalidTimeInterval, indicating no preload time.
|
readwritenonatomiccopy |
The active track IDs for this item.
|
readwritenonatomiccopy |
The custom data associated with this item, if any.