API Documentation
Core

Get/set basic info

Core

iina.core.osd('Test Message')

Recommended usage:

const { core } = iina;
core.osd('Test Message');
open(url)
Method

Open an URL in the current window.

Parameters
url
string
The URL.

Display an OSD (on screen display) message.

Parameters
message
string
The message to be displayed in the window.
pause()
Method

Pause the video.

resume()
Method

Resume the video.

stop()
Method

Stop the playback and close the current window.

Performs a relative seek (jump ahead/back).

Parameters
seconds
number
Use negative numbers to seek back.
exact
boolean
Whether to use exact seek, which jumps to the position precisely but it can be slow. If set to false, it will jump to the nearest keyframe, which is fast but can be imprecise.

Jump to the designated position exactly.

Parameters
seconds
number

Set the playback speed.

Parameters
speed
number

Get the URLs for historically played files.

Returns
History[]

defined as below.

interface History {
  name: string;
  url: string;
  date: string;
  progress: number | null;
  duration: number;
}

Get the current version of IINA and mpv.

Returns
object

defined as below.

{ iina: string, build: string, mpv: string }
window.loaded
Readonly Property

Whether the window has been loaded (i.e. all UI elements are ready). This is useful because sometimes some UI updates must be triggered after window loaded. You may also need to listen to the iina.window.loaded event.