Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Callback functions from Kodi to Add-On

Callback functions. More...

Functions

 XBMCAddon::xbmc::Player::onPlayBackStarted ()
 

Function: onPlayBackStarted()


onPlayBackStarted method.
 
 XBMCAddon::xbmc::Player::onAVStarted ()
 

Function: onAVStarted()


onAVStarted method.
 
 XBMCAddon::xbmc::Player::onAVChange ()
 

Function: onAVChange()


onAVChange method.
 
 XBMCAddon::xbmc::Player::onPlayBackEnded ()
 

Function: onPlayBackEnded()


onPlayBackEnded method.
 
 XBMCAddon::xbmc::Player::onPlayBackStopped ()
 

Function: onPlayBackStopped()


onPlayBackStopped method.
 
 XBMCAddon::xbmc::Player::onPlayBackError ()
 

Function: onPlayBackError()


onPlayBackError method.
 
 XBMCAddon::xbmc::Player::onPlayBackPaused ()
 

Function: onPlayBackPaused()


onPlayBackPaused method.
 
 XBMCAddon::xbmc::Player::onPlayBackResumed ()
 

Function: onPlayBackResumed()


onPlayBackResumed method.
 
 XBMCAddon::xbmc::Player::onQueueNextItem ()
 

Function: onQueueNextItem()


onQueueNextItem method.
 
 XBMCAddon::xbmc::Player::onPlayBackSpeedChanged (int speed)
 

Function: onPlayBackSpeedChanged(speed)


onPlayBackSpeedChanged method.
 
 XBMCAddon::xbmc::Player::onPlayBackSeek (...)
 

Function: onPlayBackSeek(time, seekOffset)


onPlayBackSeek method.
 
 XBMCAddon::xbmc::Player::onPlayBackSeekChapter (...)
 

Function: onPlayBackSeekChapter(chapter)


onPlayBackSeekChapter method.
 

Detailed Description

Callback functions.

Functions to handle control callbacks from Kodi to Add-On.


Go back to normal functions from player

Function Documentation

◆ onAVChange()

void XBMCAddon::xbmc::Player::onAVChange ( )

Function: onAVChange()


onAVChange method.

Will be called when Kodi has a video, audio or subtitle stream. Also happens when the stream changes.


v18 Python API changes
New function added.

◆ onAVStarted()

void XBMCAddon::xbmc::Player::onAVStarted ( )

Function: onAVStarted()


onAVStarted method.

Will be called when Kodi has a video or audiostream.


v18 Python API changes
New function added.

◆ onPlayBackEnded()

void XBMCAddon::xbmc::Player::onPlayBackEnded ( )

Function: onPlayBackEnded()


onPlayBackEnded method.

Will be called when Kodi stops playing a file.

◆ onPlayBackError()

void XBMCAddon::xbmc::Player::onPlayBackError ( )

Function: onPlayBackError()


onPlayBackError method.

Will be called when playback stops due to an error.

◆ onPlayBackPaused()

void XBMCAddon::xbmc::Player::onPlayBackPaused ( )

Function: onPlayBackPaused()


onPlayBackPaused method.

Will be called when user pauses a playing file.

◆ onPlayBackResumed()

void XBMCAddon::xbmc::Player::onPlayBackResumed ( )

Function: onPlayBackResumed()


onPlayBackResumed method.

Will be called when user resumes a paused file.

◆ onPlayBackSeek()

void XBMCAddon::xbmc::Player::onPlayBackSeek ( ...)

Function: onPlayBackSeek(time, seekOffset)


onPlayBackSeek method.

Will be called when user seeks to a time.

Parameters
time[integer] Time to seek to
seekOffset[integer] ?

◆ onPlayBackSeekChapter()

void XBMCAddon::xbmc::Player::onPlayBackSeekChapter ( ...)

Function: onPlayBackSeekChapter(chapter)


onPlayBackSeekChapter method.

Will be called when user performs a chapter seek.

Parameters
chapter[integer] Chapter to seek to

◆ onPlayBackSpeedChanged()

void XBMCAddon::xbmc::Player::onPlayBackSpeedChanged ( int speed)

Function: onPlayBackSpeedChanged(speed)


onPlayBackSpeedChanged method.

Will be called when players speed changes (eg. user FF/RW).

Parameters
speed[integer] Current speed of player
Note
Negative speed means player is rewinding, 1 is normal playback speed.

◆ onPlayBackStarted()

void XBMCAddon::xbmc::Player::onPlayBackStarted ( )

Function: onPlayBackStarted()


onPlayBackStarted method.

Will be called when Kodi player starts. Video or audio might not be available at this point.


v18 Python API changes
Use onAVStarted() instead if you need to detect if Kodi is actually playing a media file (i.e, if a stream is available)

◆ onPlayBackStopped()

void XBMCAddon::xbmc::Player::onPlayBackStopped ( )

Function: onPlayBackStopped()


onPlayBackStopped method.

Will be called when user stops Kodi playing a file.

◆ onQueueNextItem()

void XBMCAddon::xbmc::Player::onQueueNextItem ( )

Function: onQueueNextItem()


onQueueNextItem method.

Will be called when user queues the next item.