GCKMediaTrack.h
1 // Copyright 2014 Google Inc.
2 
3 #import <GoogleCast/GCKDefines.h>
4 
5 #import <Foundation/Foundation.h>
6 
12 GCK_ASSUME_NONNULL_BEGIN
13 
18 typedef NS_ENUM(NSInteger, GCKMediaTrackType) {
20  GCKMediaTrackTypeUnknown = 0,
22  GCKMediaTrackTypeText = 1,
24  GCKMediaTrackTypeAudio = 2,
26  GCKMediaTrackTypeVideo = 3,
27 };
28 
33 typedef NS_ENUM(NSInteger, GCKMediaTextTrackSubtype) {
35  GCKMediaTextTrackSubtypeUnknown = 0,
37  GCKMediaTextTrackSubtypeSubtitles = 1,
39  GCKMediaTextTrackSubtypeCaptions = 3,
41  GCKMediaTextTrackSubtypeDescriptions = 4,
43  GCKMediaTextTrackSubtypeChapters = 5,
45  GCKMediaTextTrackSubtypeMetadata = 6,
46 };
47 
51 GCK_EXPORT
52 @interface GCKMediaTrack : NSObject <NSCopying, NSSecureCoding>
53 
57 - (instancetype)initWithIdentifier:(NSInteger)identifier
58  contentIdentifier:(NSString *GCK_NULLABLE_TYPE)contentIdentifier
59  contentType:(NSString *)contentType
60  type:(GCKMediaTrackType)type
61  textSubtype:(GCKMediaTextTrackSubtype)textSubtype
62  name:(NSString *GCK_NULLABLE_TYPE)name
63  languageCode:(NSString *GCK_NULLABLE_TYPE)languageCode
64  customData:(id GCK_NULLABLE_TYPE)customData;
65 
67 @property(nonatomic, assign, readonly) NSInteger identifier;
68 
70 @property(nonatomic, copy, readonly, GCK_NULLABLE) NSString *contentIdentifier;
71 
73 @property(nonatomic, copy, readonly) NSString *contentType;
74 
76 @property(nonatomic, assign, readonly) GCKMediaTrackType type;
77 
79 @property(nonatomic, assign, readonly) GCKMediaTextTrackSubtype textSubtype;
80 
82 @property(nonatomic, copy, readonly, GCK_NULLABLE) NSString *name;
83 
85 @property(nonatomic, copy, readonly, GCK_NULLABLE) NSString *languageCode;
86 
91 @property(nonatomic, strong, readonly, GCK_NULLABLE) id customData;
92 
93 @end
94 
95 GCK_ASSUME_NONNULL_END
NSString * contentType
The track&#39;s content (MIME) type.
Definition: GCKMediaTrack.h:73
GCKMediaTrackType type
The track&#39;s type.
Definition: GCKMediaTrack.h:76
GCKMediaTextTrackSubtype textSubtype
The text track&#39;s subtype; applies only to text tracks.
Definition: GCKMediaTrack.h:79
NSString * contentIdentifier
The track&#39;s content identifier, which may be nil.
Definition: GCKMediaTrack.h:70
NSInteger identifier
The track&#39;s unique numeric identifier.
Definition: GCKMediaTrack.h:67
id customData
The custom data, if any.
Definition: GCKMediaTrack.h:91
NSString * name
The track&#39;s name, which may be nil.
Definition: GCKMediaTrack.h:82
A class representing a media track.
Definition: GCKMediaTrack.h:52
NSString * languageCode
The track&#39;s RFC 1766 language code, which may be nil.
Definition: GCKMediaTrack.h:85