Kodi's player.
Class: xbmc.Player() To become and create the class to play something.
Example:
Topics | |
| Callback functions from Kodi to Add-On | |
| Callback functions. | |
| play | ( | ... | ) |
Function: play([item, listitem, windowed, startpos]) | item | [opt] string - filename, url or playlist |
| listitem | [opt] listitem - used with setInfo() to set different infolabels. |
| windowed | [opt] bool - true=play video windowed, false=play users preference.(default) If playback is started windowed refresh rate switch (resolution update) is ignored. This might be useful if you are designing your own player window and want to avoid other GUI elements popping up on screen. |
| startpos | [opt] int - starting position when playing a playlist. Default = -1 |
Example:
| stop | ( | ) |
Function: stop() | pause | ( | ) |
Function: pause() | playnext | ( | ) |
Function: playnext() | playprevious | ( | ) |
Function: playprevious() | playselected | ( | ... | ) |
Function: playselected(selected) | selected | Integer - Item to select |
| isPlaying | ( | ) |
Function: isPlaying() | isPlayingAudio | ( | ) |
Function: isPlayingAudio() | isPlayingVideo | ( | ) |
Function: isPlayingVideo() | isPlayingRDS | ( | ) |
Function: isPlayingRDS() | isPlayingGame | ( | ) |
Function: isPlayingGame() | isExternalPlayer | ( | ) |
Function: isExternalPlayer() | getPlayingFile | ( | ) |
Function: getPlayingFile() | Exception | If player is not playing a file. |
| getPlayingItem | ( | ) |
Function: getPlayingItem() | Exception | If player is not playing a file. |
| getTime | ( | ) |
Function: getTime() Returns the current time of the current playing media as fractional seconds.
| Exception | If player is not playing a file. |
| seekTime | ( | ... | ) |
Function: seekTime(seekTime) Seeks the specified amount of time as fractional seconds. The time specified is relative to the beginning of the currently. playing media file.
| seekTime | Time to seek as fractional seconds |
| Exception | If player is not playing a file. |
| setSubtitles | ( | ... | ) |
Function: setSubtitles(subtitleFile) | subtitleFile | File to use as source ofsubtitles |
| showSubtitles | ( | ... | ) |
Function: showSubtitles(visible) | visible | [boolean] True for visible subtitles. |
Example:
| getSubtitles | ( | ) |
Function: getSubtitles() | getAvailableSubtitleStreams | ( | ) |
Function: getAvailableSubtitleStreams() | setSubtitleStream | ( | ... | ) |
Function: setSubtitleStream(stream) | iStream | [int] Subtitle stream to select for play |
Example:
| updateInfoTag | ( | ) |
Function: updateInfoTag(item) | item | ListItem with new info |
| Exception | If player is not playing a file |
Example:
| getGameInfoTag | ( | ) |
Function: getGameInfoTag() Returns the GameInfoTag of the current playing game.
| Exception | If player is not playing a file or current file is not a game file. |
| getVideoInfoTag | ( | ) |
Function: getVideoInfoTag() Returns the VideoInfoTag of the current playing Movie.
| Exception | If player is not playing a file or current file is not a movie file. |
| getContentGeometry | ( | ) |
Function: getContentGeometry() Returns the content rectangle in force - what the film was shot at\, as against the shape of the frame it is encoded in. A stored measurement\, a reading taken during playback and a ratio the viewer declared all reach it\, and getSource() says which.
Unlike the info tag getters this does not raise when nothing is playing\, reporting the shape Kodi rests at with source container and no frame behind it.
Example:
| getMusicInfoTag | ( | ) |
Function: getMusicInfoTag() Returns the MusicInfoTag of the current playing 'Song'.
| Exception | If player is not playing a file or current file is not a music file. |
| getRadioRDSInfoTag | ( | ) |
Function: getRadioRDSInfoTag() Returns the RadioRDSInfoTag of the current playing 'Radio Song if. present'.
| Exception | If player is not playing a file or current file is not a rds file. |
| getTotalTime | ( | ) |
Function: getTotalTime() Returns the total time of the current playing media in seconds. This is only accurate to the full second.
| Exception | If player is not playing a file. |
| getAvailableAudioStreams | ( | ) |
Function: getAvailableAudioStreams() | setAudioStream | ( | ... | ) |
Function: setAudioStream(stream) | iStream | [int] Audio stream to select for play |
Example:
| getAvailableVideoStreams | ( | ) |
Function: getAvailableVideoStreams() | setVideoStream | ( | ... | ) |
Function: setVideoStream(stream) | iStream | [int] Video stream to select for play |
Example: