Playback (External)
Interact with the desktop media player integrations.
This API allows you to control the interface between Seanime and desktop media players (MPV, IINA, VLC, MPC-HC).
Permissions
playback permission is required
{
//...
"plugin": {
"permissions": {
"scopes": ["playback"]
}
}
}Core methods
playUsingMediaPlayer
playUsingMediaPlayer(filePath)
Plays a local file using the configured media player, with automatic tracking.
Parameters:
filePath: String - Path to a scanned local video file
Note: This only works with files properly scanned by Seanime. Using it with unscanned files will result in tracking errors.
Example:
streamUsingMediaPlayer
streamUsingMediaPlayer(windowTitle, streamUrl, anime, aniDbEpisode)
Streams a video from a URL using the configured media player, with automatic tracking.
Parameters:
windowTitle: String - Title for the player windowstreamUrl: String - URL of the video streamanime: AL_BaseAnime - AniList anime objectaniDbEpisode: String - AniDB episode number
Example:
registerEventListener
registerEventListener(callback)
Registers a listener for playback events.
Parameters:
callback: Function(event: PlaybackEvent) - Function called when an event occurs
Example:
pause
Pauses the current playback.
Example:
resume
Resumes the paused playback.
Example:
seekTo
Seeks to a specific position in the current playback.
Parameters:
seconds: Number - The position to seek to in seconds
Example:
cancel
Cancels the current playback.
Example:
getNextEpisode
Gets the next episode to play after the current one.
Example:
playNextEpisode
Plays the next episode for the current media.
Example:
Best Practices
Media Tracking
The playback API is designed for tracked media files that are part of the Seanime library:
Last updated