VKPlayerViewControllerDelegate
@objc
public protocol VKPlayerViewControllerDelegate : AnyObject
A set of delegate to be called from VKPlayerViewController
-
Called when the player is ready to play the video.
Declaration
Swift
@objc optional func vkPlayerViewControllerReadyToPlay(_ player: VKPlayerViewController)
Parameters
player
The player that called this method.
-
Called when the player is buffering.
Declaration
Swift
@objc optional func vkPlayerViewControllerBuffering(_ player: VKPlayerViewController, 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 vkPlayerViewControllerCurrentTimeChanged(_ player: VKPlayerViewController)
Parameters
player
The player that called this method.
-
Called when player tried to play an item but fails.
Declaration
Swift
@objc optional func vkPlayerViewControllerFailedToPlay(_ player: VKPlayerViewController, 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 vkPlayerViewControllerDidPlayToEnd(_ player: VKPlayerViewController)
Parameters
player
The player that called this method.