VideoPlayerDelegate

@objc(YMAVideoPlayerDelegate)
public protocol VideoPlayerDelegate

Content player delegate. For each event that happend during the content playback, the corresponding callback must be called on this object.

  • Fire this callback when the content player prepared the content video.

    Declaration

    Swift

    func videoPlayerDidPrepare(_ videoPlayer: VideoPlayer)

    Parameters

    videoPlayer

    Video player that triggered the event.

  • Fire this callback when the content player completed the content video.

    Declaration

    Swift

    func videoPlayerDidComplete(_ videoPlayer: VideoPlayer)

    Parameters

    videoPlayer

    Video player that triggered the event.

  • Fire this callback when the content player resumed the content video.

    Declaration

    Swift

    func videoPlayerDidResume(_ videoPlayer: VideoPlayer)

    Parameters

    videoPlayer

    Video player that triggered the event.

  • Fire this callback when the content player paused the content video.

    Declaration

    Swift

    func videoPlayerDidPause(_ videoPlayer: VideoPlayer)

    Parameters

    videoPlayer

    Video player that triggered the event.

  • Fire this callback if the content player failed to play the content video.

    Declaration

    Swift

    func videoPlayerDidFail(_ videoPlayer: VideoPlayer)

    Parameters

    videoPlayer

    Video player that triggered the event.