OOContentItem.h
1 
9 #import <Foundation/Foundation.h>
10 #import "OOAuthorizableItem.h"
11 
12 @class OOPlayerAPIClient;
13 @class OOVideo;
14 @class OOFCCTVRating;
15 @class SsaiMetadata;
16 
20 @interface OOContentItem : NSObject <OOAuthorizableItem> {
21 @protected
22  NSString *embedCode;
23  NSString *externalId;
24  NSString *title;
25  NSString *itemDescription;
26  NSString *promoImageURL;
27  NSString *hostedAtURL;
28  OOPlayerAPIClient *api;
29  BOOL authorized;
30  BOOL haEnabled;
31  OOAuthCode authCode;
32  SsaiMetadata *ssaiMetadata;
33  NSString *contentType;
34 }
35 
36 @property (readonly, nonatomic) NSString *embedCode;
37 @property (readonly, nonatomic) NSString *externalId;
38 @property (readonly, nonatomic) NSString *title;
39 @property (readonly, nonatomic) NSString *itemDescription;
40 @property (readonly, nonatomic) NSString *promoImageURL;
41 @property (readonly, nonatomic) NSString *hostedAtURL;
42 @property (readonly, nonatomic) OOPlayerAPIClient *api;
43 @property (readonly, nonatomic) BOOL authorized;
44 @property (readonly, nonatomic) OOAuthCode authCode;
45 @property (readonly, nonatomic) NSDictionary *metadata;
46 @property (readonly, nonatomic) NSDictionary *moduleData;
47 @property (nonatomic, assign) BOOL heartbeatRequired;
48 @property (readonly, nonatomic) OOFCCTVRating *tvRating;
49 @property (readonly, nonatomic) NSString *assetPcode;
50 @property (readonly, nonatomic) NSDictionary *movieAttributes;
51 @property (readonly, nonatomic) BOOL haEnabled;
52 @property (readonly, nonatomic) BOOL needsMidStreamCheck;
53 @property (readonly, nonatomic) int midStreamCheckInterval;
54 @property (readonly, nonatomic) SsaiMetadata *ssaiMetadata;
55 @property (readonly, nonatomic) NSString *contentType;
56 @property (readonly, nonatomic) NSMutableArray *externalAds;
57 
65 - (instancetype)initWithEmbedCode:(NSString *)theEmbedCode
66  title:(NSString *)theTitle
67  description:(NSString *)theDescription;
68 
76 - (instancetype)initWithDictionary:(NSDictionary *)data
77  embedCode:(NSString *)theEmbedCode
78  api:(OOPlayerAPIClient *)theAPI;
79 
85 - (OOReturnState)updateWithDictionary:(NSDictionary *)data;
86 
93 - (NSString *)getPromoImageURLForWidth:(NSInteger)width height:(NSInteger)height;
94 
99 - (NSArray *)embedCodesToAuthorize;
100 
105 - (OOVideo *)firstVideo;
106 
113 - (OOVideo *)videoFromEmbedCode:(NSString *)embedCode
114  withCurrentItem:(OOVideo *)currentItem;
115 
123 + (OOContentItem *)contentItemFromDictionary:(NSDictionary *)data
124  embedCode:(NSString *)embedCode
125  api:(OOPlayerAPIClient *)api;
126 
134 + (OOContentItem *)contentItemFromDictionary:(NSDictionary *)data
135  embedCodes:(NSArray *)embedCodes
136  api:(OOPlayerAPIClient *)api;
137 
142 - (Float64)duration;
143 
144 @end
OOAuthCode authCode
The response code from the authorize call.
Definition: OOContentItem.h:31
NSDictionary * metadata
Definition: OOContentItem.h:45
BOOL authorized
Whether or not this OOContentItem is authorized.
Definition: OOContentItem.h:29
NSString * title
The OOContentItem&#39;s Title.
Definition: OOContentItem.h:24
NSMutableArray * externalAds
Definition: OOContentItem.h:56
OOFCCTVRating * tvRating
Definition: OOContentItem.h:48
int midStreamCheckInterval
Definition: OOContentItem.h:53
NSString * hostedAtURL
The OOContentItem&#39;s Hosted At URL.
Definition: OOContentItem.h:27
OOPlayerAPIClient * api
Definition: OOContentItem.h:28
NSDictionary * movieAttributes
Definition: OOContentItem.h:50
Float64 duration()
The total duration (not including Ads) of this OOContentItem.
NSDictionary * moduleData
Definition: OOContentItem.h:46
NSString * assetPcode
The OOContentItem&#39;s Promo Image URL.
Definition: OOContentItem.h:49
NSString * itemDescription
The OOContentItem&#39;s Description.
Definition: OOContentItem.h:25
NSArray * embedCodesToAuthorize()
Encapsulates the UI-relevant rating data of an asset.
Definition: OOFCCTVRating.h:10
NSString * promoImageURL
The OOContentItem&#39;s Promo Image URL.
Definition: OOContentItem.h:26
A single playable content item, such as video.
Definition: OOContentItem.h:20
SsaiMetadata * ssaiMetadata
Definition: OOContentItem.h:32
BOOL heartbeatRequired
Definition: OOContentItem.h:47
BOOL haEnabled
Definition: OOContentItem.h:30
NSString * contentType
Definition: OOContentItem.h:33
NSString * externalId
The OOContentItem&#39;s External ID if it exists.
Definition: OOContentItem.h:23
BOOL needsMidStreamCheck
Definition: OOContentItem.h:52
NSString * embedCode
The OOContentItem&#39;s Embed Code.
Definition: OOContentItem.h:22
OOVideo * firstVideo()
Get the first OOVideo for this OOContentItem.
this class implements video stream object
Definition: OOVideo.h:22