继承 NSObject。实现 <NSDuplicate>。
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
streamType: |
|
(GCKMediaStreamType) |
streamType |
contentType: |
|
(NSString *) |
contentType |
metadata: |
|
(GCKMediaMetadata *__nullable) |
metadata |
streamDuration: |
|
(NSTimeInterval) |
streamDuration |
mediaTracks: |
|
(NSArray< GCKMediaTrack * > *__nullable) |
mediaTracks |
textTrackStyle: |
|
(GCKMediaTextTrackStyle *__nullable) |
textTrackStyle |
customData: |
|
(id __nullable) |
customData |
|
|
| |
指定的初始化程序。
- 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 . |
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
streamType: |
|
(GCKMediaStreamType) |
streamType |
contentType: |
|
(NSString *) |
contentType |
metadata: |
|
(GCKMediaMetadata *__nullable) |
metadata |
streamDuration: |
|
(NSTimeInterval) |
streamDuration |
customData: |
|
(id __nullable) |
customData |
|
|
| |
旧版初始化程序;不包括媒体轨道或文本轨道样式。
- Parameters
-
contentID | The content ID. |
streamType | The stream type. |
contentType | The content (MIME) type. |
metadata | The media item metadata. |
streamDuration | The stream duration. |
customData | Custom application-specific data. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil . |
- Deprecated:
- 使用指定的初始化程序。
- (GCKMediaTrack *__nullable) mediaTrackWithID: |
|
(NSInteger) |
trackID |
|
搜索具有给定轨道 ID 的媒体轨道。
- Parameters
-
trackID | The media track ID. |
- 返回
- 匹配的 GCKMediaTrack 对象,如果没有指定 ID 的媒体轨道,则为
nil
。
- (NSString*) contentType |
|
readnonatomiccopy |
- (NSTimeInterval) streamDuration |
|
readnonatomicassign |
视频流的时长,以秒为单位;如果是直播,则为 INFINITY
。