IMAAVPlayerVideoDisplay.h
1 //
2 // IMAAVPlayerVideoDisplay.h
3 // GoogleIMA3
4 //
5 // Copyright (c) 2013 Google Inc. All rights reserved.
6 //
7 // Declares an object that reuses an AVPlayer for both content and ad playback
8 
9 #import <UIKit/UIKit.h>
10 
11 #import "IMAVideoDisplay.h"
12 
13 @class AVPlayer;
14 @class AVPlayerItem;
15 @class AVURLAsset;
17 
21 extern NSString *const kIMASubtitleLanguage;
22 
26 extern NSString *const kIMASubtitleWebVTT;
27 
31 extern NSString *const kIMASubtitleTTML;
32 
37 
38 @optional
39 
47 - (void)avPlayerVideoDisplay:(IMAAVPlayerVideoDisplay *)avPlayerVideoDisplay
48  willLoadStreamAsset:(AVURLAsset *)avUrlAsset;
49 
50 @end
51 
57 @interface IMAAVPlayerVideoDisplay : NSObject <IMAVideoDisplay>
58 
62 @property(nonatomic, strong, readonly) AVPlayer *player;
63 
68 @property(nonatomic, strong, readonly) AVPlayerItem *playerItem;
69 
73 @property(nonatomic, weak) id<IMAAVPlayerVideoDisplayDelegate> avPlayerVideoDisplayDelegate;
74 
78 @property(nonatomic, strong, readonly) NSArray *subtitles;
79 
88 - (instancetype)initWithAVPlayer:(AVPlayer *)player;
89 
93 - (instancetype)init NS_UNAVAILABLE;
94 
95 @end
instancetype NS_UNAVAILABLE()
:nodoc:
AVPlayer * player
The content player used for both content and ad video playback.
Definition: IMAAVPlayerVideoDisplay.h:62
A callback protocol for IMAAVPlayerVideoDisplayDelegate.
Definition: IMAAVPlayerVideoDisplay.h:36
An implementation of the IMAVideoDisplay protocol.
Definition: IMAAVPlayerVideoDisplay.h:57
AVPlayerItem * playerItem
The player item that will be played by the player.
Definition: IMAAVPlayerVideoDisplay.h:68
NSArray * subtitles
The subtitles for the current stream.
Definition: IMAAVPlayerVideoDisplay.h:78
id< IMAAVPlayerVideoDisplayDelegate > avPlayerVideoDisplayDelegate
Allows the publisher to receive IMAAVPlayerVideoDisplay specific events.
Definition: IMAAVPlayerVideoDisplay.h:73