InstreamAdPlayerDelegate
@objc(YMAInstreamAdPlayerDelegate)
public protocol InstreamAdPlayerDelegate
Ad player delegate. For each event that happend during the ad playback, the corresponding callback must be called on this object.
-
Fire this callback when instream ad player is ready to present the mediaFile.
- player: The ad player.
- videoAd: Prepared video ad.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didPrepare videoAd: VideoAd)
-
Fire this callback when instream ad player started the mediaFile.
- player: The ad player.
- videoAd: Started video ad.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didStart videoAd: VideoAd)
-
Fire this callback when instream ad player paused the mediaFile.
- player: The ad player.
- videoAd: Paused video ad.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didPause videoAd: VideoAd)
-
Fire this callback when instream ad player resumed the mediaFile.
- player: The ad player.
- videoAd: Resumed video ad.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didResume videoAd: VideoAd)
-
Fire this callback when instream ad player completed the mediaFile.
- player: The ad player.
- videoAd: Completed video ad.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didComplete videoAd: VideoAd)
-
Fire this callback when instream ad player stopped the mediaFile.
- player: The ad player.
- videoAd: Stopped video ad.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didStop videoAd: VideoAd)
-
Fire this callback if an error occures in instream ad player while preparing or playing the mediaFile.
- player: The ad player.
- videoAd: Video ad that failed to play.
Declaration
Swift
func instreamAdPlayer( _ player: InstreamAdPlayer, didFailVideoAd videoAd: VideoAd, withError error: InstreamAdPlayerError )
-
Fire this callback when instream ad player volume was updated.
- player: The ad player.
- videoAd: Muted video ad.
- volume: Volume value that was set to the player
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, videoAd: VideoAd, didUpdated volume: Double)