GCKMediaInformationBuilder Class
Stay organized with collections
Save and categorize content based on your preferences.
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.
The content ID for this stream. More...
The URL of the content to be played. More...
The list of ad breaks in this content. More...
The list of ad break clips in this content. More...
The length of the stream, in seconds, or INFINITY
if it is a live stream. More...
The media tracks for this stream. More...
The text track style for this stream. More...
The deep link for the media as used by Google Assistant, if any. More...
The VMAP request configuration if any. More...
The start time of the stream, in seconds in epoch time, or kGCKInvalidTimeInterval
if it is not available. More...
The format of the HLS audio segment. More...
The format of the HLS video segment. More...
- (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.
read
write
nonatomic
copy
The content ID for this stream.
- Deprecated:
- Use contentURL and entity instead.
read
write
nonatomic
copy
The URL of the content to be played.
- Since
- 4.3.4
read
write
nonatomic
assign
The stream type.
Defaults to GCKMediaStreamTypeBuffered.
- (NSString*) contentType
read
write
nonatomic
copy
read
write
nonatomic
assign
read
write
nonatomic
copy
The list of ad breaks in this content.
read
write
nonatomic
copy
The list of ad break clips in this content.
- (NSTimeInterval) streamDuration
read
write
nonatomic
assign
The length of the stream, in seconds, or INFINITY
if it is a live stream.
Defaults to 0.
read
write
nonatomic
copy
The media tracks for this stream.
read
write
nonatomic
copy
The text track style for this stream.
read
write
nonatomic
copy
The deep link for the media as used by Google Assistant, if any.
read
write
nonatomic
assign
- (NSTimeInterval) startAbsoluteTime
read
write
nonatomic
assign
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
read
write
nonatomic
assign
The format of the HLS audio segment.
- Since
- 4.6.0
read
write
nonatomic
assign
The format of the HLS video segment.
- Since
- 4.6.0
read
write
nonatomic
assign
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGCKMediaInformationBuilder\u003c/code\u003e class is used to construct new or modify existing \u003ccode\u003eGCKMediaInformation\u003c/code\u003e instances, which hold details about media items.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to initialize with content URL, entity, a base \u003ccode\u003eGCKMediaInformation\u003c/code\u003e object, or content ID (deprecated).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can set various attributes of the media, like content type, stream type, metadata, ad breaks, duration, and custom data.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild\u003c/code\u003e method creates a \u003ccode\u003eGCKMediaInformation\u003c/code\u003e object from the builder's current state.\u003c/p\u003e\n"],["\u003cp\u003eSome properties like \u003ccode\u003econtentID\u003c/code\u003e are deprecated in favor of \u003ccode\u003econtentURL\u003c/code\u003e and \u003ccode\u003eentity\u003c/code\u003e for better media identification.\u003c/p\u003e\n"]]],["The `GCKMediaInformationBuilder` class allows constructing new or derived `GCKMediaInformation` instances. To create a new instance, initialize a builder with `initWithContentURL` or `initWithEntity`, set properties like `contentType`, `streamType`, and `metadata`, and then call `build`. To derive from an existing instance, initialize the builder with `initWithMediaInformation`, modify properties such as `contentID` or `streamDuration`, and use `build`. Key properties include `contentURL`, `streamType`, `contentType`, `streamDuration`, `metadata`, and `entity`, that describe the media and their respective values.\n"],null,[]]