Skip to content

Commit

Permalink
update Google IMA SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLeberle committed Sep 14, 2021
1 parent c15166f commit a17b9d2
Show file tree
Hide file tree
Showing 33 changed files with 124 additions and 60 deletions.
12 changes: 6 additions & 6 deletions GoogleInteractiveMediaAds.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-x86_64-simulator</string>
<key>LibraryPath</key>
<string>GoogleInteractiveMediaAds.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>GoogleInteractiveMediaAds.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>x86_64</string>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* The player to track.
*/
@property(nonatomic, strong, readonly) AVPlayer *player;
@property(nonatomic, readonly) AVPlayer *player;

/**
* Initializes a IMAAVPlayerContentPlayhead that tracks a player. It will attach a periodic time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extern NSString *const kIMASubtitleTTML;
/**
* The subtitles for the current stream. Will be nil until the stream starts playing.
*/
@property(nonatomic, strong, readonly) NSArray *subtitles;
@property(nonatomic, readonly) NSArray *subtitles;

/**
* A dictionary that contains options used to customize the initialization of an @c AVURLAsset for
Expand All @@ -89,4 +89,19 @@ extern NSString *const kIMASubtitleTTML;
*/
- (instancetype)initWithAVPlayer:(AVPlayer *)player;

#if TARGET_OS_TV && __TV_OS_VERSION_MAX_ALLOWED >= 140000
/**
* Creates an IMAAVPlayerVideoDisplay that will play ads in the passed in
* content player. Use this initializer for tvOS 14+.
*
* @param player the AVPlayer instance used for playing content
* @param nowPlayingSession the session used to listen for remote control events and to update
* playback info.
*
* @return an IMAAVPlayerVideoDisplay instance
*/
- (instancetype)initWithAVPlayer:(AVPlayer *)player
nowPlayingSession:(MPNowPlayingSession *)nowPlayingSession API_AVAILABLE(tvos(14.0));
#endif

@end
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
/**
* Set of ad podding properties.
*/
@property(nonatomic, strong, readonly) IMAAdPodInfo *adPodInfo;
@property(nonatomic, readonly) IMAAdPodInfo *adPodInfo;

/**
* String representing custom trafficking parameters from the VAST response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property(nonatomic, weak, nullable) UIViewController *adContainerViewController;

/**
* The environment to focus on during an ad break. Nil if there is not currently an ad break, or if
* the ad break does not require focus.
*/
/** The environment to focus on during an ad break. Nil if there is not currently an ad break. */
@property(nonatomic, readonly, nullable) id<UIFocusEnvironment> focusEnvironment;

/** List of companion ad slots. Can be nil or empty. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ extern NSString *const kIMAAdBreakTime;
* The current ad that is playing or just played. This will be nil except for
* events where an ad is available (start, quartiles, midpoint, complete, and tap).
*/
@property(nonatomic, strong, readonly) IMAAd *ad;
@property(nonatomic, readonly) IMAAd *ad;

/**
* Extra data about the ad. Can be nil.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
* The ads manager instance created by the ads loader.
* Will be nil when using dynamic ad insertion.
*/
@property(nonatomic, strong, readonly) IMAAdsManager *adsManager;
@property(nonatomic, readonly) IMAAdsManager *adsManager;

/**
* The stream manager instance created by the ads loader.
* Will be nil when requesting ads client side.
*/
@property(nonatomic, strong, readonly) IMAStreamManager *streamManager;
@property(nonatomic, readonly) IMAStreamManager *streamManager;

/**
* The user context specified in the ads request.
*/
@property(nonatomic, strong, readonly) id userContext;
@property(nonatomic, readonly) id userContext;

@end

Expand All @@ -53,12 +53,12 @@
/**
* The ad error that occurred while loading the ad.
*/
@property(nonatomic, strong, readonly) IMAAdError *adError;
@property(nonatomic, readonly) IMAAdError *adError;

/**
* The user context specified in the ads request.
*/
@property(nonatomic, strong, readonly) id userContext;
@property(nonatomic, readonly) id userContext;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
/**
* Groups various properties about the linear ad playback.
*/
@property(nonatomic, strong, readonly) id<IMAAdPlaybackInfo> adPlaybackInfo;
@property(nonatomic, readonly) id<IMAAdPlaybackInfo> adPlaybackInfo;

/**
* Set and get the volume for the current ad. From 0 (muted) to 1 (loudest). This volume is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,16 @@ extern const NSInteger kIMAAutodetectBitrate;
@property(nonatomic) BOOL enablePreloading;

/**
* Specifies the optional UIViewController that will be used to present an
* in-app browser or app store.
* Specifies the optional UIViewController that will be used to open links in-app.
* When nil, tapping the video ad "Learn More" button or companion ads
* will result in opening Safari browser. Setting this allows the SDK to open links in-app. This
* field is ignored on tvOS, where Safari is not available. Required for SKAdNetwork.
* field is ignored on tvOS, where Safari is not available.
*/
@property(nonatomic, weak) UIViewController *linkOpenerPresentingController;

/**
* The IMALinkOpenerDelegate to be notified when a link is opened/closed.
* SKAdNetwork and web links are unavailable on tvOS, but this delegate will
* be used to notify for deep links.
* Web links are unavailable on tvOS, but this delegate will be used to notify for deep links.
*/
@property(nonatomic, weak) id<IMALinkOpenerDelegate> linkOpenerDelegate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
/**
* The ad display container.
*/
@property(nonatomic, strong, readonly) IMAAdDisplayContainer *adDisplayContainer;
@property(nonatomic, readonly) IMAAdDisplayContainer *adDisplayContainer;

/**
* The user context.
*/
@property(nonatomic, strong, readonly) id userContext;
@property(nonatomic, readonly) id userContext;

/**
* Specifies whether the player intends to start the content and ad in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* The view the companion will be rendered in. Display this view in your
* application before video ad starts.
*/
@property(nonatomic, strong, readonly) UIView *view;
@property(nonatomic, readonly) UIView *view;

/**
* Width of the slot, in pixels. This value is sent to the DFP ad server for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
*/
@property(nonatomic, copy) NSString *playerVersion;

/**
* The session ID to identify a single user session. This should be a UUID. It
* is used exclusively for frequency capping across the user session.
*/
@property(nonatomic, copy) NSString *sessionID;

/**
* Toggles debug mode which will output detailed log information to the console.
* Debug mode should be disabled in Release and will display a watermark when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
/**
* The stream display container for displaying the ad UI.
*/
@property(nonatomic, strong, readonly) IMAAdDisplayContainer *adDisplayContainer;
@property(nonatomic, readonly) IMAAdDisplayContainer *adDisplayContainer;

/**
* The video display where the stream can be played.
*/
@property(nonatomic, strong, readonly) id<IMAVideoDisplay> videoDisplay;
@property(nonatomic, readonly) id<IMAVideoDisplay> videoDisplay;

/**
* The stream request API key. It's configured through the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

#import "IMAAdPlaybackInfo.h"

#import <MediaPlayer/MediaPlayer.h>

NS_ASSUME_NONNULL_BEGIN

@protocol IMAVideoDisplay;

/**
Expand Down Expand Up @@ -143,14 +147,23 @@
/**
* Allows the publisher to send player events to the SDK.
*/
@property(nonatomic, weak) id<IMAVideoDisplayDelegate> delegate;
@property(nullable, nonatomic, weak) id<IMAVideoDisplayDelegate> delegate;

/**
* Set and get the volume for the current ad. From 0 (muted) to 1 (loudest). This volume is
* relative to device volume, not absolute. Default value is 1.
*/
@property(nonatomic, assign) float volume;

#if TARGET_OS_TV && __TV_OS_VERSION_MAX_ALLOWED >= 140000
/**
* Returns the now playing session for video playback. If nil by ad or stream request time, the ads
* loader will error out. This is required on tvOS 14+ so that the SDK is able to listen for remote
* control play and pause events even when focus is on ad UI.
*/
@property(nonatomic, readonly) MPNowPlayingSession *nowPlayingSession API_AVAILABLE(tvos(14.0));
#endif

/**
* Called to inform the VideoDisplay to load the passed URL with the subtitles for the stream.
* Subtitles are available only for dynamic ad insertion VOD streams and can be ignored
Expand All @@ -169,7 +182,8 @@
* "webvtt" -> "https://somedomain.com/vtt/en.vtt"
* "ttml" -> "https://somedomain.com/ttml/en.ttml"
*/
- (void)loadStream:(NSURL *)streamURL withSubtitles:(NSArray *)subtitles;
- (void)loadStream:(NSURL *)streamURL
withSubtitles:(NSArray<NSDictionary<NSString *, NSString *> *> *)subtitles;

/**
* Called to inform the VideoDisplay to play.
Expand All @@ -194,3 +208,5 @@
- (void)seekStreamToTime:(NSTimeInterval)time;

@end

NS_ASSUME_NONNULL_END
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.14.1
3.14.4
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* The player to track.
*/
@property(nonatomic, strong, readonly) AVPlayer *player;
@property(nonatomic, readonly) AVPlayer *player;

/**
* Initializes a IMAAVPlayerContentPlayhead that tracks a player. It will attach a periodic time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extern NSString *const kIMASubtitleTTML;
/**
* The subtitles for the current stream. Will be nil until the stream starts playing.
*/
@property(nonatomic, strong, readonly) NSArray *subtitles;
@property(nonatomic, readonly) NSArray *subtitles;

/**
* A dictionary that contains options used to customize the initialization of an @c AVURLAsset for
Expand All @@ -89,4 +89,19 @@ extern NSString *const kIMASubtitleTTML;
*/
- (instancetype)initWithAVPlayer:(AVPlayer *)player;

#if TARGET_OS_TV && __TV_OS_VERSION_MAX_ALLOWED >= 140000
/**
* Creates an IMAAVPlayerVideoDisplay that will play ads in the passed in
* content player. Use this initializer for tvOS 14+.
*
* @param player the AVPlayer instance used for playing content
* @param nowPlayingSession the session used to listen for remote control events and to update
* playback info.
*
* @return an IMAAVPlayerVideoDisplay instance
*/
- (instancetype)initWithAVPlayer:(AVPlayer *)player
nowPlayingSession:(MPNowPlayingSession *)nowPlayingSession API_AVAILABLE(tvos(14.0));
#endif

@end
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
/**
* Set of ad podding properties.
*/
@property(nonatomic, strong, readonly) IMAAdPodInfo *adPodInfo;
@property(nonatomic, readonly) IMAAdPodInfo *adPodInfo;

/**
* String representing custom trafficking parameters from the VAST response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property(nonatomic, weak, nullable) UIViewController *adContainerViewController;

/**
* The environment to focus on during an ad break. Nil if there is not currently an ad break, or if
* the ad break does not require focus.
*/
/** The environment to focus on during an ad break. Nil if there is not currently an ad break. */
@property(nonatomic, readonly, nullable) id<UIFocusEnvironment> focusEnvironment;

/** List of companion ad slots. Can be nil or empty. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ extern NSString *const kIMAAdBreakTime;
* The current ad that is playing or just played. This will be nil except for
* events where an ad is available (start, quartiles, midpoint, complete, and tap).
*/
@property(nonatomic, strong, readonly) IMAAd *ad;
@property(nonatomic, readonly) IMAAd *ad;

/**
* Extra data about the ad. Can be nil.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
* The ads manager instance created by the ads loader.
* Will be nil when using dynamic ad insertion.
*/
@property(nonatomic, strong, readonly) IMAAdsManager *adsManager;
@property(nonatomic, readonly) IMAAdsManager *adsManager;

/**
* The stream manager instance created by the ads loader.
* Will be nil when requesting ads client side.
*/
@property(nonatomic, strong, readonly) IMAStreamManager *streamManager;
@property(nonatomic, readonly) IMAStreamManager *streamManager;

/**
* The user context specified in the ads request.
*/
@property(nonatomic, strong, readonly) id userContext;
@property(nonatomic, readonly) id userContext;

@end

Expand All @@ -53,12 +53,12 @@
/**
* The ad error that occurred while loading the ad.
*/
@property(nonatomic, strong, readonly) IMAAdError *adError;
@property(nonatomic, readonly) IMAAdError *adError;

/**
* The user context specified in the ads request.
*/
@property(nonatomic, strong, readonly) id userContext;
@property(nonatomic, readonly) id userContext;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
/**
* Groups various properties about the linear ad playback.
*/
@property(nonatomic, strong, readonly) id<IMAAdPlaybackInfo> adPlaybackInfo;
@property(nonatomic, readonly) id<IMAAdPlaybackInfo> adPlaybackInfo;

/**
* Set and get the volume for the current ad. From 0 (muted) to 1 (loudest). This volume is
Expand Down
Loading

0 comments on commit a17b9d2

Please sign in to comment.