GCKMediaInformation 类
    
    
      
    
    
      
      使用集合让一切井井有条
    
    
      
      根据您的偏好保存内容并对其进行分类。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
继承 NSObject、<NSCopy> 和 <NSSecureCoding>。
      
        
          | - (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  | 
        
        
           | 
           | 
           |  | 
        
      
 
已弃用。
使用 GCKMediaInformationBuilder 初始化 GCKMediaInformation 对象。
- 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. | 
  
   
- 开始时间
 - 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  | 
        
        
           | 
           | 
           |  | 
        
      
 
已弃用。
使用 GCKMediaInformationBuilder 初始化 GCKMediaInformation 对象。
- 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 | 
           | 
        
      
 
搜索具有指定轨道 ID 的媒体轨道。
- Parameters
 - 
  
    | trackID | The media track ID.  | 
  
   
- 返回
 - 匹配的 GCKMediaTrack 对象;如果没有具有指定 ID 的媒体轨道,则为 
nil。 
 
 
  
  
      
        
          | - (NSString*) contentType | 
         
       
   | 
  
readnonatomiccopy   | 
  
 
 
此内容中的广告插播时间点剪辑列表。
- 开始时间
 - 3.3 
 
 
 
  
  
      
        
          | - (NSTimeInterval) streamDuration | 
         
       
   | 
  
readnonatomicassign   | 
  
 
视频流的时长(以秒为单位),如果是直播活动,则为 INFINITY。
 
 
Google 助理使用的媒体的深层链接(如有)。
- 开始时间
 - 4.0 
 
 
 
VMAP 请求配置(如果有)。
详见数字视频广告投放模板 4.0。如果此字段为非 nil,则系统将忽略所有其他广告相关字段。
- 开始时间
 - 4.3.4 
 
 
 
  
  
      
        
          | - (NSTimeInterval) startAbsoluteTime | 
         
       
   | 
  
readnonatomicassign   | 
  
 
直播开始时间的纪元时间(以秒为单位)。
对于开始时间已知的直播(例如直播电视节目或体育比赛),则为事件开始的纪元时间。否则,它是直播开始时实时可搜索范围的开始时间。
- 开始时间
 - 4.4.1 
 
 
 
 
  
  
  
 
  
    
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):2025-07-25。
  
  
  
    
      [null,null,["最后更新时间 (UTC):2025-07-25。"],[],["The `GCKMediaInformation` class aggregates data about a media item, including its `contentID`, `contentURL`, `streamType`, and `contentType`. It also includes media metadata, such as `metadata`, `adBreaks`, `adBreakClips`, `streamDuration`, and `mediaTracks`. Actions include initializing the media item using deprecated methods, searching for a media track by its ID with `mediaTrackWithID:`, and accessing properties, which includes properties like the `textTrackStyle`, `entity`, `VMAP`, `startAbsoluteTime`, `hlsSegmentFormat`, `hlsVideoSegmentFormat`, and custom data (`customData`).\n"]]