GCKMediaInformation 类
继承 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
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-12-06。
[null,null,["最后更新时间 (UTC):2022-12-06。"],[[["The `GCKMediaInformation` class stores details about a media item, such as its content ID, stream type, content type, metadata, stream duration, and custom data."],["It provides methods to initialize media information objects with or without media tracks and text track styles."],["Developers can access properties like `contentID`, `streamType`, `contentType`, `metadata`, `streamDuration`, and more to retrieve media information."],["It includes methods to find specific media tracks using their track IDs."],["The class inherits from `NSObject` and implements the `NSCopying` protocol."]]],[]]