commit | author | age
|
655e66
|
1 |
/* |
H |
2 |
* Copyright (C) 2017 Twitter, Inc. |
|
3 |
* |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
* |
|
16 |
*/ |
a0a843
|
17 |
|
H |
18 |
#import <TwitterKit/TWTRJSONConvertible.h> |
|
19 |
#import <UIKit/UIKit.h> |
|
20 |
|
|
21 |
NS_ASSUME_NONNULL_BEGIN |
|
22 |
|
|
23 |
FOUNDATION_EXTERN NSString *const TWTRMediaTypeMP4; |
|
24 |
FOUNDATION_EXTERN NSString *const TWTRMediaTypeM3u8; |
|
25 |
|
|
26 |
@interface TWTRVideoMetaDataVariant : NSObject <NSCoding, NSCopying, TWTRJSONConvertible> |
|
27 |
|
|
28 |
/** |
|
29 |
* The bitrate of the entitity |
|
30 |
*/ |
|
31 |
@property (nonatomic, readonly) NSInteger bitrate; |
|
32 |
|
|
33 |
/** |
|
34 |
* The content type of the video entity. |
|
35 |
*/ |
|
36 |
@property (nonatomic, copy, readonly) NSString *contentType; |
|
37 |
|
|
38 |
/** |
|
39 |
* The URL for the entity. |
|
40 |
*/ |
|
41 |
@property (nonatomic, readonly) NSURL *URL; |
|
42 |
|
|
43 |
@end |
|
44 |
|
|
45 |
@interface TWTRVideoMetaData : NSObject <NSCoding, NSCopying, TWTRJSONConvertible> |
|
46 |
|
|
47 |
/** |
|
48 |
* The URL of the video if the video is an mp4. This value is provided as a convenience |
|
49 |
* method but user's should query the `variants` property to have finer grained control |
|
50 |
* over which video they play. |
|
51 |
*/ |
|
52 |
@property (nonatomic, readonly, nullable) NSURL *videoURL; |
|
53 |
|
|
54 |
/** |
|
55 |
* Returns the array of variants. |
|
56 |
*/ |
|
57 |
@property (nonatomic, readonly) NSArray *variants; |
|
58 |
|
|
59 |
/** |
|
60 |
* The video's aspect ratio. |
|
61 |
*/ |
|
62 |
@property (nonatomic, readonly) CGFloat aspectRatio; |
|
63 |
|
|
64 |
/** |
|
65 |
* The video's duration in seconds. |
|
66 |
*/ |
|
67 |
@property (nonatomic, readonly) NSTimeInterval duration; |
|
68 |
|
|
69 |
@end |
|
70 |
|
|
71 |
NS_ASSUME_NONNULL_END |