VideoPlayer

@objc(YMAVideoPlayer)
public protocol VideoPlayer

This protocol is used for playing content video.

  1. delegate
  2. position
  3. duration
  4. prepareVideo()
  5. pauseVideo()
  6. resumeVideo()

delegate

Delegate object. For each event that happend during the playback, the corresponding callback must be called on this object.

Declaration

Swift

weak var delegate: VideoPlayerDelegate? { get set }

position

Content video position in seconds.

Declaration

Swift

var position: TimeInterval { get }

duration

Content video duration in seconds.

Declaration

Swift

var duration: TimeInterval { get }

prepareVideo()

Prepares player to play content video.

Declaration

Swift

func prepareVideo()

pauseVideo()

Pauses content video.

Declaration

Swift

func pauseVideo()

resumeVideo()

Resumes content video.

Declaration

Swift

func resumeVideo()