| 1 | // |
| 2 | // TWTRVideoMetaData.h |
| 3 | // TwitterKit |
| 4 | // |
| 5 | // Copyright © 2016 Twitter. All rights reserved. |
| 6 | // |
| 7 | |
| 8 | #import <UIKit/UIKit.h> |
| 9 | #import <TwitterKit/TWTRJSONConvertible.h> |
| 10 | |
| 11 | NS_ASSUME_NONNULL_BEGIN |
| 12 | |
| 13 | FOUNDATION_EXTERN NSString * const TWTRMediaTypeMP4; |
| 14 | FOUNDATION_EXTERN NSString * const TWTRMediaTypeM3u8; |
| 15 | |
| 16 | @interface TWTRVideoMetaDataVariant : NSObject <NSCoding, NSCopying, TWTRJSONConvertible> |
| 17 | |
| 18 | /** |
| 19 | * The bitrate of the entitity |
| 20 | */ |
| 21 | @property (nonatomic, readonly) NSInteger bitrate; |
| 22 | |
| 23 | /** |
| 24 | * The content type of the video entity. |
| 25 | */ |
| 26 | @property (nonatomic, copy, readonly) NSString *contentType; |
| 27 | |
| 28 | /** |
| 29 | * The URL for the entity. |
| 30 | */ |
| 31 | @property (nonatomic, readonly) NSURL *URL; |
| 32 | |
| 33 | @end |
| 34 | |
| 35 | |
| 36 | |
| 37 | @interface TWTRVideoMetaData : NSObject <NSCoding, NSCopying, TWTRJSONConvertible> |
| 38 | |
| 39 | /** |
| 40 | * The URL of the video if the video is an mp4. This value is provided as a convenience |
| 41 | * method but user's should query the `variants` property to have finer grained control |
| 42 | * over which video they play. |
| 43 | */ |
| 44 | @property (nonatomic, readonly, nullable) NSURL *videoURL; |
| 45 | |
| 46 | /** |
| 47 | * Returns the array of variants. |
| 48 | */ |
| 49 | @property (nonatomic, readonly) NSArray *variants; |
| 50 | |
| 51 | /** |
| 52 | * The video's aspect ratio. |
| 53 | */ |
| 54 | @property (nonatomic, readonly) CGFloat aspectRatio; |
| 55 | |
| 56 | /** |
| 57 | * The video's duration in seconds. |
| 58 | */ |
| 59 | @property (nonatomic, readonly) NSTimeInterval duration; |
| 60 | |
| 61 | @end |
| 62 | |
| 63 | NS_ASSUME_NONNULL_END |