SASBaseInterstitialManagerInternalDelegate
Objective-C
@protocol SASBaseInterstitialManagerInternalDelegate <NSObject>
Swift
protocol SASBaseInterstitialManagerInternalDelegate : NSObjectProtocol
Internal SASBaseInterstitialManager delegate.
This delegate can be used to retrieve internal views and events of the SDK. It should only be implemented to if you are using a third party SDK responsible to measure some stats on your ads SDKs.
Warning
Views and objects retrieved from these methods should never be used for anything else than viewability and performance measurement. These internal objects might change without warning in future SDK version.-
Notifies the delegate that the ad view will start playing native video.
Implement this method if you want to know when an ad view starts playing native video (e.g. from a native video).
Warning
Interacting with the AVPlayer instance can lead to unexpected behaviour. This method will only be triggered by native video creatives, not by HTML based creatives.
Declaration
Objective-C
- (void)baseInterstitialManager: (nonnull SASBaseInterstitialManager *)baseInterstitialManager willPlayVideoWithAVPlayer:(nonnull AVPlayer *)player withPlayerLayer:(nonnull CALayer *)playerLayer withContainingView:(nonnull UIView *)containingView;
Swift
func baseInterstitialManager(_ baseInterstitialManager: SASBaseInterstitialManager, willPlayVideoWithAVPlayer player: Any!, withPlayerLayer playerLayer: CALayer, withContaining containingView: UIView)
Parameters
baseInterstitialManager
The interstitial manager which is going to play the video.
player
The AVPlayer instance responsible for playing the video.
playerLayer
A CALayer inheriting instance. AVPlayerLayer class for standard native videos. CALayer class for 360° native videos.
containingView
The UIView which is going to contain the video layer.
-
Notifies the delegate that the layer rendering the current native video ad did change to a new CALayer instance and/or a new container view.
This method will be called for Video-Read ads when they enter fullscreen.
Implement this method if you want to know when a playing native video ad changes its rendering layer or its hierarchical parent.
Warning
Interacting with the AVPlayer instance can lead to unexpected behaviour. This method will only be triggered by native video creatives, not by HTML based creatives.
Declaration
Objective-C
- (void)baseInterstitialManager: (nonnull SASBaseInterstitialManager *)baseInterstitialManager withAVPlayer:(nonnull AVPlayer *)player didSwitchToPlayerLayer:(nonnull CALayer *)playerLayer withContainingView:(nonnull UIView *)containingView;
Swift
func baseInterstitialManager(_ baseInterstitialManager: SASBaseInterstitialManager, withAVPlayer player: Any!, didSwitchToPlayerLayer playerLayer: CALayer, withContaining containingView: UIView)
Parameters
baseInterstitialManager
The interstitial manager which is going to play the video.
player
The AVPlayer instance responsible for playing the video.
playerLayer
A CALayer inheriting instance where the video is rendered. AVPlayerLayer class for standard native videos. CALayer class for 360° native videos.
containingView
The UIView which is going to contain the video layer.
-
Notifies the delegate that the end card creative from the current video ad has been loaded and displayed.
Implement this method if you need to track the viewability of the end card.
Declaration
Objective-C
- (void)baseInterstitialManager: (nonnull SASBaseInterstitialManager *)baseInterstitialManager didLoadEndCardInView:(nonnull UIView *)view;
Swift
func baseInterstitialManager(_ baseInterstitialManager: SASBaseInterstitialManager, didLoadEndCardIn view: UIView)
Parameters
baseInterstitialManager
The interstitial manager which is going to play the video.
view
The UIView instance responsible for displaying the end card.