GCKMediaInformation Class

GCKMediaInformation Class Reference

Overview

A class that aggregates information about a media item.

Inherits NSObject, <NSCopying>, and <NSSecureCoding>.

Property Summary

NSString * 
The content ID for this stream. More...
NSURL * 
The URL of the content to be played. More...
The stream type. More...
NSString * 
The content (MIME) type. More...
The media item metadata. More...
NSArray< GCKAdBreakInfo * > * 
The list of ad breaks in this content. More...
NSArray< GCKAdBreakClipInfo * > * 
The list of ad break clips in this content. More...
NSTimeInterval 
The length of the stream, in seconds, or INFINITY if it is a live stream. More...
NSArray< GCKMediaTrack * > * 
The media tracks for this stream. More...
The text track style for this stream. More...
NSString * 
The deep link for the media as used by Google Assistant, if any. More...
The VMAP request configuration if any. More...
NSTimeInterval 
The epoch time, in seconds, of a live stream's start time. More...
The format of the HLS audio segment. More...
The format of the HLS video segment. More...
id 
The custom data, if any. More...

Method Detail

- (instancetype) initWithContentID: (NSString *)  contentID
streamType: ( GCKMediaStreamType streamType
contentType: (NSString *)  contentType
metadata: (nullable GCKMediaMetadata *)  metadata
adBreaks: (nullable NSArray< GCKAdBreakInfo * > *)  adBreaks
adBreakClips: (nullable NSArray< GCKAdBreakClipInfo * > *)  adBreakClips
streamDuration: (NSTimeInterval)  streamDuration
mediaTracks: (nullable NSArray< GCKMediaTrack * > *)  mediaTracks
textTrackStyle: (nullable GCKMediaTextTrackStyle *)  textTrackStyle
customData: (nullable id)  customData

Deprecated.

Use GCKMediaInformationBuilder to initialize GCKMediaInformation objects.

Parameters
contentID The content ID.
streamType The stream type.
contentType The content (MIME) type.
metadata The media item metadata.
adBreaks The list of ad breaks in this content.
adBreakClips The list of ad break clips in this content.
streamDuration The stream duration.
mediaTracks The media tracks, if any, otherwise nil .
textTrackStyle The text track style, if any, otherwise nil .
customData The custom application-specific data. Must either be an object that can be serialized to JSON using NSJSONSerialization , or nil .
Since
4.3
- (instancetype) initWithContentID: (NSString *)  contentID
streamType: ( GCKMediaStreamType streamType
contentType: (NSString *)  contentType
metadata: (nullable GCKMediaMetadata *)  metadata
streamDuration: (NSTimeInterval)  streamDuration
mediaTracks: (nullable NSArray< GCKMediaTrack * > *)  mediaTracks
textTrackStyle: (nullable GCKMediaTextTrackStyle *)  textTrackStyle
customData: (nullable id)  customData

Deprecated.

Use GCKMediaInformationBuilder to initialize GCKMediaInformation objects.

Parameters
contentID The content ID.
streamType The stream type.
contentType The content (MIME) type.
metadata The media item metadata.
streamDuration The stream duration.
mediaTracks The media tracks, if any, otherwise nil .
textTrackStyle The text track style, if any, otherwise nil .
customData The custom application-specific data. Must either be an object that can be serialized to JSON using NSJSONSerialization , or nil .
- (nullable GCKMediaTrack *) mediaTrackWithID: (NSInteger)  trackID

Searches for a media track with the given track ID.

Parameters
trackID
The media track ID.
Returns
The matching GCKMediaTrack object, or nil if there is no media track with the given ID.

Property Detail

- (NSString*) contentID
read nonatomic copy

The content ID for this stream.

- (NSURL*) contentURL
read nonatomic copy

The URL of the content to be played.

Since
4.3.4
- ( GCKMediaStreamType ) streamType
read nonatomic assign

The stream type.

- (NSString*) contentType
read nonatomic copy

The content (MIME) type.

- ( GCKMediaMetadata *) metadata
read nonatomic assign

The media item metadata.

- (NSArray< GCKAdBreakInfo *>*) adBreaks
read nonatomic copy

The list of ad breaks in this content.

- (NSArray< GCKAdBreakClipInfo *>*) adBreakClips
read nonatomic copy

The list of ad break clips in this content.

Since
3.3
- (NSTimeInterval) streamDuration
read nonatomic assign

The length of the stream, in seconds, or INFINITY if it is a live stream.

- (NSArray< GCKMediaTrack *>*) mediaTracks
read nonatomic copy

The media tracks for this stream.

- ( GCKMediaTextTrackStyle *) textTrackStyle
read nonatomic copy

The text track style for this stream.

- (NSString*) entity
read nonatomic copy

The deep link for the media as used by Google Assistant, if any.

Since
4.0
- ( GCKVASTAdsRequest *) VMAP
read nonatomic assign

The VMAP request configuration if any.

See more here: Digital Video Ad Serving Template 4.0 . If this is non-nil, all other ads related fields will be ignored.

Since
4.3.4
- (NSTimeInterval) startAbsoluteTime
read nonatomic assign

The epoch time, in seconds, of a live stream's start time.

For live streams that have a known start time, e.g. a live TV show or sport game, it would be the epoch time that the event started. Otherwise, it will be start time of the live seekable range when the streaming started.

Since
4.4.1
- ( GCKHLSSegmentFormat ) hlsSegmentFormat
read nonatomic assign

The format of the HLS audio segment.

Since
4.6.0
- ( GCKHLSVideoSegmentFormat ) hlsVideoSegmentFormat
read nonatomic assign

The format of the HLS video segment.

Since
4.6.0
- (id) customData
read nonatomic assign

The custom data, if any.

Create a Mobile Website
View Site in Mobile | Classic
Share by: