GCKMediaInformationBuilder Class
A builder object for constructing new or derived GCKMediaInformation instances.
The builder may be used to derive a GCKMediaInformation from an existing one:
It can also be used to construct a new GCKMediaInformation from scratch:
- Since
- 4.0
Inherits NSObject.
- (instancetype) initWithContentURL: |
|
(NSURL *) |
contentURL |
|
Constructs a new GCKMediaInformationBuilder with the given required attributes, and all other attributes initialized to default values.
- Parameters
-
contentURL | The URL of the content to be played. |
- Since
- 4.3.4
- (instancetype) initWithEntity: |
|
(NSString *) |
entity |
|
Constructs a new GCKMediaInformationBuilder with the given required attributes, and all other attributes initialized to default values.
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
|
Constructs a new GCKMediaInformationBuilder with the given required attributes, and all other attributes initialized to default values.
- Deprecated:
- Use initWithContentURL: or initWithEntity: instead.
Constructs a new GCKMediaInformationBuilder with the given required attributes, and all other attributes initialized to default values.
- Deprecated:
- Use initWithContentURL: or initWithEntity: instead.
The content ID for this stream.
- Deprecated:
- Use contentURL and entity instead.
The URL of the content to be played.
- Since
- 4.3.4
The stream type.
Defaults to GCKMediaStreamTypeBuffered.
- (NSString*) contentType |
|
readwritenonatomiccopy |
The list of ad breaks in this content.
The list of ad break clips in this content.
- (NSTimeInterval) streamDuration |
|
readwritenonatomicassign |
The length of the stream, in seconds, or INFINITY
if it is a live stream.
Defaults to 0.
The media tracks for this stream.
The text track style for this stream.
The deep link for the media as used by Google Assistant, if any.
- (NSTimeInterval) startAbsoluteTime |
|
readwritenonatomicassign |
The start time of the stream, in seconds in epoch time, or kGCKInvalidTimeInterval
if it is not available.
Defaults to kGCKInvalidTimeInterval
.
- Since
- 4.4.1
The format of the HLS audio segment.
- Since
- 4.6.0
The format of the HLS video segment.
- Since
- 4.6.0
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `GCKMediaInformationBuilder` class is used to construct new or modify existing `GCKMediaInformation` instances, which hold details about media items."],["It provides methods to initialize with content URL, entity, a base `GCKMediaInformation` object, or content ID (deprecated)."],["Developers can set various attributes of the media, like content type, stream type, metadata, ad breaks, duration, and custom data."],["The `build` method creates a `GCKMediaInformation` object from the builder's current state."],["Some properties like `contentID` are deprecated in favor of `contentURL` and `entity` for better media identification."]]],[]]