IMAAdsRequest.h
1 //
2 // IMAAdsRequest.h
3 // GoogleIMA3
4 //
5 // Copyright (c) 2013 Google Inc. All rights reserved.
6 //
7 // Declares a simple ad request class.
8 
9 #import <Foundation/Foundation.h>
10 
15 @protocol IMAContentPlayhead;
16 
20 @interface IMAAdsRequest : NSObject
21 
28 @property(nonatomic, copy, readonly) NSString *adTagUrl;
29 
35 @property(nonatomic, copy, readonly) NSString *adsResponse;
36 
40 @property(nonatomic, strong, readonly) IMAAdDisplayContainer *adDisplayContainer;
41 
45 @property(nonatomic, strong, readonly) id userContext;
46 
52 @property(nonatomic) BOOL adWillAutoPlay;
53 
58 @property(nonatomic) BOOL adWillPlayMuted;
59 
64 @property(nonatomic) float contentDuration;
65 
70 @property(nonatomic, copy) NSArray<NSString *> *contentKeywords;
71 
76 @property(nonatomic, copy) NSString *contentTitle;
77 
82 @property(nonatomic) float vastLoadTimeout;
83 
89 @property(nonatomic) float liveStreamPrefetchSeconds;
90 
105 - (instancetype)initWithAdsResponse:(NSString *)adsResponse
106  adDisplayContainer:(IMAAdDisplayContainer *)adDisplayContainer
107  avPlayerVideoDisplay:(IMAAVPlayerVideoDisplay *)avPlayerVideoDisplay
108  pictureInPictureProxy:(IMAPictureInPictureProxy *)pictureInPictureProxy
109  userContext:(id)userContext;
110 
124 - (instancetype)initWithAdsResponse:(NSString *)adsResponse
125  adDisplayContainer:(IMAAdDisplayContainer *)adDisplayContainer
126  contentPlayhead:(NSObject<IMAContentPlayhead> *)contentPlayhead
127  userContext:(id)userContext NS_DESIGNATED_INITIALIZER;
128 
143 - (instancetype)initWithAdTagUrl:(NSString *)adTagUrl
144  adDisplayContainer:(IMAAdDisplayContainer *)adDisplayContainer
145  avPlayerVideoDisplay:(IMAAVPlayerVideoDisplay *)avPlayerVideoDisplay
146  pictureInPictureProxy:(IMAPictureInPictureProxy *)pictureInPictureProxy
147  userContext:(id)userContext;
148 
162 - (instancetype)initWithAdTagUrl:(NSString *)adTagUrl
163  adDisplayContainer:(IMAAdDisplayContainer *)adDisplayContainer
164  contentPlayhead:(NSObject<IMAContentPlayhead> *)contentPlayhead
165  userContext:(id)userContext NS_DESIGNATED_INITIALIZER;
166 
170 - (instancetype)init NS_UNAVAILABLE;
171 
172 @end
BOOL adWillPlayMuted
Specifies whether the player intends to start the content and ad with no volume.
Definition: IMAAdsRequest.h:58
BOOL adWillAutoPlay
Specifies whether the player intends to start the content and ad in response to a user action or whet...
Definition: IMAAdsRequest.h:52
A proxy class for allowing the SDK to detect entering and exiting Picture-in-Picture.
Definition: IMAPictureInPictureProxy.h:26
IMAAdDisplayContainer * adDisplayContainer
The ad display container.
Definition: IMAAdsRequest.h:40
NSString * contentTitle
Specifies the title of the content to be shown.
Definition: IMAAdsRequest.h:76
The IMAAdDisplayContainer is responsible for managing the ad container view and companion ad slots us...
Definition: IMAAdDisplayContainer.h:16
Data class describing the ad request.
Definition: IMAAdsRequest.h:20
An implementation of the IMAVideoDisplay protocol.
Definition: IMAAVPlayerVideoDisplay.h:57
instancetype NS_UNAVAILABLE()
:nodoc:
float vastLoadTimeout
Specifies the VAST load timeout in milliseconds for the initial request and any subsequent wrappers...
Definition: IMAAdsRequest.h:82
float contentDuration
Specifies the duration of the content in seconds to be shown.
Definition: IMAAdsRequest.h:64
float liveStreamPrefetchSeconds
Specifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL.
Definition: IMAAdsRequest.h:89
Defines an interface for a class that tracks video content progress and exposes a key value observabl...
Definition: IMAContentPlayhead.h:25
NSString * adsResponse
Specifies a VAST, VMAP, or ad rules response to be used instead of making a request via an ad tag URL...
Definition: IMAAdsRequest.h:35
An implementation of IMAContentPlayhead for AVPlayer.
Definition: IMAAVPlayerContentPlayhead.h:19
NSArray< NSString * > * contentKeywords
Specifies the keywords used to describe the content to be shown.
Definition: IMAAdsRequest.h:70
NSString * adTagUrl
Specifies the full URL to use for ads loading from an ad server.
Definition: IMAAdsRequest.h:28
id userContext
The user context.
Definition: IMAAdsRequest.h:45