Readonly
loadedWhether the window is loaded. Typically, the window is loaded when it's going to play the first file. The window must be loaded to display OSDs and overlays. If these APIs are called before the window is loaded, they will be ignored or even raise an error.
Use event.on("iina.window-loaded") to listen to the event.
Readonly
visibleWhether the window is visible on the screen.
Readonly
screensGet the information of all screens in the system.
Get or set the current position and size of the window.
// get the current frame
let frame = core.window.frame;
// move the window to (100, 100)
core.window.frame = { ...frame, x: 100, y: 100 };
Use event.on("iina.window-moved") and event.on("iina.window-resized") to get notified when the frame changes.
Get or set the current fullscreen state.
// toggle fullscreen
core.window.fullscreen = !core.window.fullscreen;
Get or set the current Picture-in-Picture (PIP) state.
Get or set the current always-on-top state.
// make the window always on top
core.window.ontop = true;
When reading, get the current displayed sidebar name, or null
if no sidebar is shown.
When writing, show the sidebar with the specified name, or hide the sidebar if null
is given.
// show the playlist sidebar
core.window.sidebar = "playlist";
// hide the sidebar
core.window.sidebar = null;
Note that plugins can add their own sidebars,
and the sidebar names are prefixed with plugin:
.
If it's your own plugin, you can use sidebar.show instead.
Generated using TypeDoc
The interface of
core.window
. Controls the player window.Seealso
The Core module