VideoPlayerDelegate
@objc public protocol VideoPlayerDelegate: class
The Video Player delegate protocol defines the event methods available for a Video.
-
event occurs on Buffering of Video Start.
Declaration
Swift
@objc optional func onBufferingStart() -
event occurs on Buffering of Video Complete.
Declaration
Swift
@objc optional func onBufferingComplete() -
event occurs asynchronously when video buffering is in progress.
Declaration
Swift
@objc optional func onBufferingProgress(_ progress: Int)Parameters
progresscurrent Buffer Progerss
-
event occurs continously when video streaming is going on.
Declaration
Swift
@objc optional func onCurrentPlayTime(_ progress: Int)Parameters
progresscurrent playing time of video.
-
event occurs when video streaming start.
Declaration
Swift
@objc optional func onStreamingStarted(_ duration: Int)Parameters
durationtotal duration of video.
-
event occurs when video streaming completed.
Declaration
Swift
@objc optional func onStreamCompleted() -
event occurs when video is shared with TV for the first time.
Declaration
Swift
@objc optional func onPlayerInitialized() -
event occurs when different type of media is shared with TV. (video is shared after photo/audio share)
Declaration
Swift
@objc optional func onPlayerChange(_ playerType: String)Parameters
playerTypecurrent player type (photo/audio/video)
-
event occurs when paused video is played.
Declaration
Swift
@objc optional func onPlay() -
event occurs on video pause.
Declaration
Swift
@objc optional func onPause() -
event occurs on video stop.
Declaration
Swift
@objc optional func onStop() -
event occurs on fast forwarding the video.
Declaration
Swift
@objc optional func onForward() -
event occurs on rewind the video.
Declaration
Swift
@objc optional func onRewind() -
event occurs on Player mute.
Declaration
Swift
@objc optional func onMute() -
event occurs on Player unMute.
Declaration
Swift
@objc optional func onUnMute() -
event occurs when Player plays next content.
Declaration
Swift
@objc optional func onNext() -
event occurs when Player plays previous content.
Declaration
Swift
@objc optional func onPrevious() -
provides the status of play controls like volume, mute/unmute and mode of player like single or repeat all - parameter volLevel: player volume level - parameter muteStatus: player mute status - parameter shuffleStatus: player shuffle status - parameter mode: player mode single or repeat all
Declaration
Swift
@objc optional func onControlStatus(_ volLevel: Int, muteStatus: Bool, mode: String)Parameters
volLevelplayer volume level
muteStatusplayer mute status
shuffleStatusplayer shuffle status
modeplayer mode single or repeat all
-
event occurs on player volume change.
Declaration
Swift
@objc optional func onVolumeChange(_ volLevel: Int)Parameters
volLevelplayer volume to be set.
-
event occurs on video addition in TV queue(player list).
Declaration
Swift
@objc optional func onAddToList(_ enqueuedItem: [String: AnyObject])Parameters
enqueuedItemenqueued video item.
-
event occurs on video remove from TV queue(player list).
Declaration
Swift
@objc optional func onRemoveFromList(_ dequeuedItem: [String: AnyObject])Parameters
dequeuedItemdequeued video Item.
-
event occurs on TV queue(player list) deletion.
Declaration
Swift
@objc optional func onClearList() -
event occurs when player list(TV queue) is recieved.
Declaration
Swift
@objc optional func onGetList(_ queueList: [String: AnyObject])Parameters
queueListplay list of TV
-
event occurs on player list repeat.
Declaration
Swift
@objc optional func onRepeat(_ mode: String)Parameters
modespecify repeat all/repeat single audio
-
occurs when new audio is shared with TV.
Declaration
Swift
@objc optional func onCurrentPlaying(_ currentItem: [String: AnyObject])Parameters
currentItemcurrent shared item.
-
occurs when TV Application/widget goes into background.
Declaration
Swift
@objc optional func onApplicationSuspend() -
occurs when TV Application/widget comes in foreground.
Declaration
Swift
@objc optional func onApplicationResume() -
occurs when error is occured in playing Audio
Declaration
Swift
@objc optional func onError(_ error: NSError)Parameters
erroreror details
VideoPlayerDelegate Protocol Reference