IINA+ Module Reference
New in version 0.2.2.
Control IINA+ (https://github.com/CarterLi/iina) using JXA-like syntax.
Classes:
|
An enumeration. |
|
A class for managing and interacting with IINA.app. |
|
An audio media track. |
|
A wrapper around lists of audio tracks that employs fast enumeration techniques. |
|
A player in IINA.app. |
|
A wrapper around lists of players that employs fast enumeration techniques. |
|
An item in a playlist. |
|
A wrapper around lists of playlist items that employs fast enumeration techniques. |
|
A subtitle media track. |
|
A wrapper around lists of subtitle tracks that employs fast enumeration techniques. |
|
A media track. |
|
A wrapper around lists of tracks that employs fast enumeration techniques. |
|
A video media track. |
|
A wrapper around lists of video tracks that employs fast enumeration techniques. |
- class PyXA.apps.IINA.IINAObjectClass(value)[source]
Bases:
Enum
An enumeration.
Attributes:
- APPLICATION = 'capp'
- AUDIO_TRACK = 'cTrA'
- PLAYER = 'cPla'
- PLAYLIST_ITEM = 'cPLI'
- SUBTITLE_TRACK = 'cTrS'
- TRACK = 'cTra'
- VIDEO_TRACK = 'cTrV'
- WINDOW = 'cwin'
- class PyXA.apps.IINA.XAIINAApplication(properties)[source]
Bases:
XASBApplication
,XACanOpenPath
A class for managing and interacting with IINA.app.
New in version 0.2.2.
Classes:
PlayerState
(value)States of a player.
TrackType
(value)States of a player.
Attributes:
Is IINA the active application?
The name of the application.
The version number of the application.
Methods:
Advance to the next frame.
Advance to the next playlist item.
pause
()Pause playback.
play
()Begin or resume playback.
players
([filter])Returns a list of players, as PyXA objects, matching the given filter.
Toggle the playing/paused state of the player.
Return to the previous frame.
Return to the previous playlist item.
- class PlayerState(value)[source]
Bases:
Enum
States of a player.
Attributes:
Playback is paused
Playback is playing
The player is seeking
- PAUSED = 1800426352
Playback is paused
- PLAYING = 1800426320
Playback is playing
- SEEKING = 1800426323
The player is seeking
- class TrackType(value)[source]
Bases:
Enum
States of a player.
Attributes:
Audio track
Subtitle track
Video track
- AUDIO = 1800688705
Audio track
- SUBTITLE = 1800688723
Subtitle track
- VIDEO = 1800688726
Video track
- property frontmost: bool
Is IINA the active application?
- property name: str
The name of the application.
- players(filter: dict | None = None) XAIINAPlayerList [source]
Returns a list of players, as PyXA objects, matching the given filter.
- Parameters:
filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned players will have, or None
- Returns:
The list of players
- Return type:
New in version 0.2.2.
- property version: str
The version number of the application.
- class PyXA.apps.IINA.XAIINAAudioTrack(properties)[source]
Bases:
XAObject
An audio media track.
New in version 0.2.2.
Attributes:
The number of audio channels in the track.
The sample rate of the audio track.
- property channel_count: int
The number of audio channels in the track.
- property sample_rate: int
The sample rate of the audio track.
- class PyXA.apps.IINA.XAIINAAudioTrackList(properties: dict, filter: dict | None = None)[source]
Bases:
XAList
A wrapper around lists of audio tracks that employs fast enumeration techniques.
All properties of audio tracks can be called as methods on the wrapped list, returning a list containing each tracks’s value for the property.
New in version 0.2.2.
Methods:
by_channel_count
(channel_count)by_sample_rate
(sample_rate)- by_channel_count(channel_count: int) XAIINAAudioTrack | None [source]
- by_sample_rate(sample_rate: int) XAIINAAudioTrack | None [source]
- class PyXA.apps.IINA.XAIINAPlayer(properties)[source]
Bases:
XAObject
,XACloseable
A player in IINA.app.
New in version 0.2.2.
Attributes:
The current aspect ratio.
The audio output volume (0 = minimum, 150 = maximum, 100 = normal).
The index of the current audio track.
The current playlist item.
The index of the current subtitle track.
The index of the current video track.
The currently playing file.
The file loop setting (whether the file should loop continuously).
Whether the video is flipped (vertically).
Is the player in fullscreen?
The unique ID of the player.
Whether the video is mirrored (horizontally).
Is the playing in music mode?
Has the audio output been muted?
The name of the player.
Is the player in picture-in-picture mode? (macOS 10.12+)
The playback speed.
The playback position in seconds.
The current video rotation in degrees.
The index of the second subtitle track.
The playback state.
The currently playing URL.
The player's currently visible window.
Methods:
audio_tracks
([filter])Returns a list of audio tracks, as PyXA objects, matching the given filter.
Advance to the next frame.
Advance to the next playlist item.
pause
()Pause playback.
play
()Begin or resume playback.
playlist_items
([filter])Returns a list of playlist items, as PyXA objects, matching the given filter.
Toggle the playing/paused state of the player.
Return to the previous frame.
Return to the previous playlist item.
subtitle_tracks
([filter])Returns a list of subtitle tracks, as PyXA objects, matching the given filter.
tracks
([filter])Returns a list of tracks, as PyXA objects, matching the given filter.
video_tracks
([filter])Returns a list of video tracks, as PyXA objects, matching the given filter.
- property aspect_ratio: str
The current aspect ratio.
- audio_tracks(filter: dict | None = None) XAIINAAudioTrackList [source]
Returns a list of audio tracks, as PyXA objects, matching the given filter.
- Parameters:
filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned audio tracks will have, or None
- Returns:
The list of audio tracks
- Return type:
New in version 0.2.2.
- property audio_volume: int
The audio output volume (0 = minimum, 150 = maximum, 100 = normal).
- property current_audio_track: XAIINAAudioTrack
The index of the current audio track.
- property current_playlist_item: XAIINAPlaylistItem
The current playlist item.
- property current_subtitle_track: XAIINASubtitleTrack
The index of the current subtitle track.
- property current_video_track: XAIINAVideoTrack
The index of the current video track.
- property file_loop: bool
The file loop setting (whether the file should loop continuously).
- property flipped: bool
Whether the video is flipped (vertically).
- property fullscreen: bool
Is the player in fullscreen?
- property id: str
The unique ID of the player.
- property mirrored: bool
Whether the video is mirrored (horizontally).
- property music_mode: bool
Is the playing in music mode?
- property muted: bool
Has the audio output been muted?
- property name: str
The name of the player.
- property pip: bool
Is the player in picture-in-picture mode? (macOS 10.12+)
- property playback_speed: float
The playback speed.
- playlist_items(filter: dict | None = None) XAIINAPlaylistItemList [source]
Returns a list of playlist items, as PyXA objects, matching the given filter.
- Parameters:
filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned playlist items will have, or None
- Returns:
The list of playlist items
- Return type:
New in version 0.2.2.
- property position: float
The playback position in seconds.
- property rotation: int
The current video rotation in degrees.
- property second_subtitle_track: XAIINASubtitleTrack
The index of the second subtitle track.
- property state: PlayerState
The playback state.
- subtitle_tracks(filter: dict | None = None) XAIINASubtitleTrackList [source]
Returns a list of subtitle tracks, as PyXA objects, matching the given filter.
- Parameters:
filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned subtitle tracks will have, or None
- Returns:
The list of subtitle tracks
- Return type:
New in version 0.2.2.
- tracks(filter: dict | None = None) XAIINATrackList [source]
Returns a list of tracks, as PyXA objects, matching the given filter.
- Parameters:
filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned tracks will have, or None
- Returns:
The list of tracks
- Return type:
New in version 0.2.2.
- video_tracks(filter: dict | None = None) XAIINAVideoTrackList [source]
Returns a list of video tracks, as PyXA objects, matching the given filter.
- Parameters:
filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned video tracks will have, or None
- Returns:
The list of video tracks
- Return type:
New in version 0.2.2.
- property window: XASBWindow
The player’s currently visible window.
- class PyXA.apps.IINA.XAIINAPlayerList(properties: dict, filter: dict | None = None)[source]
Bases:
XAList
A wrapper around lists of players that employs fast enumeration techniques.
All properties of players can be called as methods on the wrapped list, returning a list containing each player’s value for the property.
New in version 0.2.2.
Methods:
by_aspect_ratio
(aspect_ratio)by_audio_volume
(audio_volume)by_current_audio_track
(current_audio_track)by_current_playlist_item
(current_playlist_item)by_current_subtitle_track
(current_subtitle_track)by_current_video_track
(current_video_track)by_file
(file)by_file_loop
(file_loop)by_flipped
(flipped)by_fullscreen
(fullscreen)by_id
(id)by_mirrored
(mirrored)by_music_mode
(music_mode)by_muted
(muted)by_name
(name)by_pip
(pip)by_playback_speed
(playback_speed)by_position
(position)by_rotation
(rotation)by_second_subtitle_track
(second_subtitle_track)by_state
(state)by_url
(url)by_window
(window)file
()flipped
()id
()mirrored
()muted
()name
()pip
()position
()rotation
()state
()url
()window
()- by_aspect_ratio(aspect_ratio: str) XAIINAPlayer | None [source]
- by_audio_volume(audio_volume: int) XAIINAPlayer | None [source]
- by_current_audio_track(current_audio_track: XAIINAAudioTrack) XAIINAPlayer | None [source]
- by_current_playlist_item(current_playlist_item: XAIINAPlaylistItem) XAIINAPlayer | None [source]
- by_current_subtitle_track(current_subtitle_track: XAIINASubtitleTrack) XAIINAPlayer | None [source]
- by_current_video_track(current_video_track: XAIINAVideoTrack) XAIINAPlayer | None [source]
- by_file(file: XAPath | str) XAIINAPlayer | None [source]
- by_file_loop(file_loop: bool) XAIINAPlayer | None [source]
- by_flipped(flipped: bool) XAIINAPlayer | None [source]
- by_fullscreen(fullscreen: bool) XAIINAPlayer | None [source]
- by_id(id: str) XAIINAPlayer | None [source]
- by_mirrored(mirrored: bool) XAIINAPlayer | None [source]
- by_music_mode(music_mode: bool) XAIINAPlayer | None [source]
- by_muted(muted: bool) XAIINAPlayer | None [source]
- by_name(name: str) XAIINAPlayer | None [source]
- by_pip(pip: bool) XAIINAPlayer | None [source]
- by_playback_speed(playback_speed: float) XAIINAPlayer | None [source]
- by_position(position: float) XAIINAPlayer | None [source]
- by_rotation(rotation: int) XAIINAPlayer | None [source]
- by_second_subtitle_track(second_subtitle_track: XAIINASubtitleTrack) XAIINAPlayer | None [source]
- by_state(state: PlayerState) XAIINAPlayer | None [source]
- by_url(url: XAURL | str) XAIINAPlayer | None [source]
- by_window(window: XASBWindow) XAIINAPlayer | None [source]
- current_audio_track() XAIINAAudioTrackList [source]
- current_playlist_item() XAIINAPlaylistItemList [source]
- current_subtitle_track() XAIINASubtitleTrackList [source]
- current_video_track() XAIINAVideoTrackList [source]
- second_subtitle_track() XAIINASubtitleTrackList [source]
- state() list[PlayerState] [source]
- window() XASBWindowList [source]
- class PyXA.apps.IINA.XAIINAPlaylistItem(properties)[source]
Bases:
XAObject
An item in a playlist.
New in version 0.2.2.
Attributes:
Whether the item is the currently selected item.
Whether the item is currently playng.
The file path of the item on the disk.
The name of the item.
Whether the item is an internet location item.
The URL of the item.
- property current: bool
Whether the item is the currently selected item.
- property currently_playing: bool
Whether the item is currently playng.
- property name: str
The name of the item.
- property network: bool
Whether the item is an internet location item.
- class PyXA.apps.IINA.XAIINAPlaylistItemList(properties: dict, filter: dict | None = None)[source]
Bases:
XAList
A wrapper around lists of playlist items that employs fast enumeration techniques.
All properties of playlist items can be called as methods on the wrapped list, returning a list containing each item’s value for the property.
New in version 0.2.2.
Methods:
by_current
(current)by_currently_playing
(currently_playing)by_file
(file)by_name
(name)by_network
(network)by_url
(url)current
()file
()name
()network
()url
()- by_current(current: bool) XAIINAPlaylistItem | None [source]
- by_currently_playing(currently_playing: bool) XAIINAPlaylistItem | None [source]
- by_file(file: XAPath | str) XAIINAPlaylistItem | None [source]
- by_name(name: str) XAIINAPlaylistItem | None [source]
- by_network(network: bool) XAIINAPlaylistItem | None [source]
- by_url(url: XAURL | str) XAIINAPlaylistItem | None [source]
- class PyXA.apps.IINA.XAIINASubtitleTrack(properties)[source]
Bases:
XAObject
A subtitle media track.
New in version 0.2.2.
- class PyXA.apps.IINA.XAIINASubtitleTrackList(properties: dict, filter: dict | None = None)[source]
Bases:
XAList
A wrapper around lists of subtitle tracks that employs fast enumeration techniques.
All properties of subtitle tracks can be called as methods on the wrapped list, returning a list containing each tracks’s value for the property.
New in version 0.2.2.
- class PyXA.apps.IINA.XAIINATrack(properties)[source]
Bases:
XAObject
A media track.
New in version 0.2.2.
Attributes:
The audio/video codec of the track.
Whether this is the default track.
A text description of the track.
The language of the track.
The name of the track.
The type of the track, either audio, video, or subtitle.
- property codec: str
The audio/video codec of the track.
- property default: bool
Whether this is the default track.
- property info_string: str
A text description of the track.
- property language: str
The language of the track.
- property name: str
The name of the track.
- class PyXA.apps.IINA.XAIINATrackList(properties: dict, filter: dict | None = None)[source]
Bases:
XAList
A wrapper around lists of tracks that employs fast enumeration techniques.
All properties of tracks can be called as methods on the wrapped list, returning a list containing each tracks’s value for the property.
New in version 0.2.2.
Methods:
by_codec
(codec)by_default
(default)by_info_string
(info_string)by_language
(language)by_name
(name)by_type
(type)codec
()default
()language
()name
()type
()- by_codec(codec: str) XAIINATrack | None [source]
- by_default(default: bool) XAIINATrack | None [source]
- by_info_string(info_string: str) XAIINATrack | None [source]
- by_language(language: str) XAIINATrack | None [source]
- by_name(name: str) XAIINATrack | None [source]
- by_type(type: TrackType) XAIINATrack | None [source]
- class PyXA.apps.IINA.XAIINAVideoTrack(properties)[source]
Bases:
XAObject
A video media track.
New in version 0.2.2.
Attributes:
The frames per second of the video.
The height of the video in pixels.
The width of the video in pixels.
- property fps: float
The frames per second of the video.
- property height: int
The height of the video in pixels.
- property width: int
The width of the video in pixels.
- class PyXA.apps.IINA.XAIINAVideoTrackList(properties: dict, filter: dict | None = None)[source]
Bases:
XAList
A wrapper around lists of video tracks that employs fast enumeration techniques.
All properties of video tracks can be called as methods on the wrapped list, returning a list containing each tracks’s value for the property.
New in version 0.2.2.
Methods:
by_fps
(fps)by_height
(height)by_width
(width)fps
()height
()width
()- by_fps(fps: float) XAIINAVideoTrack | None [source]
- by_height(height: int) XAIINAVideoTrack | None [source]
- by_width(width: int) XAIINAVideoTrack | None [source]