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
playerThe player that called this method.
-
Called when the player is buffering.
Declaration
Swift
@objc optional func vkPlayerViewControllerBuffering(_ player: VKPlayerViewController, 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 vkPlayerViewControllerCurrentTimeChanged(_ player: VKPlayerViewController)Parameters
playerThe 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
playerThe player that called this method.
errorThe playback error
-
Called when the player has finished playing the video.
Declaration
Swift
@objc optional func vkPlayerViewControllerDidPlayToEnd(_ player: VKPlayerViewController)Parameters
playerThe player that called this method.
VKPlayerViewControllerDelegate Protocol Reference