VKPlayerViewDelegate
@objc
public protocol VKPlayerViewDelegate : AnyObject
-
Called when the player is ready to play the video.
Declaration
Swift
@objc optional func vkPlayerViewReadyToPlay(_ player: VKPlayerView)Parameters
playerThe player that called this method.
-
Called when the player is buffering.
Declaration
Swift
@objc optional func vkPlayerViewBuffering(_ player: VKPlayerView, buffering: Bool)Parameters
playerThe player that called this method.
bufferingIf the value is
truethen the player is buffering. When the player finishes buffering the delegate is called again with the value beingfalse. -
Called when the current time of playback has changed.
Declaration
Swift
@objc optional func vkPlayerViewCurrentTimeChanged(_ player: VKPlayerView)Parameters
playerThe player that called this method.
-
Called when the play state of the player has changed.
Declaration
Swift
@objc optional func vkPlayerViewPlayStateDidChange(_ player: VKPlayerView)Parameters
playerThe player that called this method.
-
Called when player tried to play the video but fails.
Declaration
Swift
@objc optional func vkPlayerViewFailedToPlay(_ player: VKPlayerView, error: VKError)Parameters
playerThe player that called this method.
errorThe playback error
-
Called when the player has finished playing the video.
Declaration
Swift
@objc optional func vkPlayerViewDidPlayToEnd(_ player: VKPlayerView)Parameters
playerThe player that called this method.
VKPlayerViewDelegate Protocol Reference