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.
- instreamAdPlayer(_:didPrepare:)
- instreamAdPlayer(_:didStart:)
- instreamAdPlayer(_:didPause:)
- instreamAdPlayer(_:didResume:)
- instreamAdPlayer(_:didComplete:)
- instreamAdPlayer(_:didStop:)
- instreamAdPlayer(_:didFailVideoAd:withError:)
- instreamAdPlayer(_:videoAd:didUpdated:)
Fire this callback when instream ad player is ready to present the mediaFile.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didPrepare videoAd: VideoAd)
Fire this callback when instream ad player started the mediaFile.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didStart videoAd: VideoAd)
Fire this callback when instream ad player paused the mediaFile.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didPause videoAd: VideoAd)
Fire this callback when instream ad player resumed the mediaFile.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didResume videoAd: VideoAd)
Fire this callback when instream ad player completed the mediaFile.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, didComplete videoAd: VideoAd)
Fire this callback when instream ad player stopped the mediaFile.
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.
Declaration
Swift
func instreamAdPlayer(
_ player: InstreamAdPlayer,
didFailVideoAd videoAd: VideoAd,
withError error: InstreamAdPlayerError
)
Fire this callback when instream ad player volume was updated.
Declaration
Swift
func instreamAdPlayer(_ player: InstreamAdPlayer, videoAd: VideoAd, didUpdated volume: Double)