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
player
The player that called this method.
-
Called when the player is buffering.
Declaration
Swift
@objc optional func vkPlayerViewBuffering(_ player: VKPlayerView, buffering: Bool)
Parameters
player
The player that called this method.
buffering
If the value is
true
then 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
player
The player that called this method.
-
Called when the play state of the player has changed.
Declaration
Swift
@objc optional func vkPlayerViewPlayStateDidChange(_ player: VKPlayerView)
Parameters
player
The 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
player
The player that called this method.
error
The playback error
-
Called when the player has finished playing the video.
Declaration
Swift
@objc optional func vkPlayerViewDidPlayToEnd(_ player: VKPlayerView)
Parameters
player
The player that called this method.