player
Iina(player_path, extra_args=[], play_callback=None)
¶
Bases: SubProcessPlayerBase
The iina subprocess player class.
For detailed documentation about the functions and arguments have a look at the base class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
player_path
|
str
|
|
required |
extra_args
|
List[str]
|
|
[]
|
play_callback
|
Optional[PlayCallback]
|
|
None
|
Source code in api/src/anipy_api/player/players/iina.py
Mpv(player_path, extra_args=[], play_callback=None)
¶
Bases: SubProcessPlayerBase
The mpv subprocess player class. For a controllable mpv look here.
Info
Not only mpv works but mpv forks like mpv.net also work.
For detailed documentation about the functions and arguments have a look at the base class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
player_path
|
str
|
|
required |
extra_args
|
List[str]
|
|
[]
|
play_callback
|
Optional[PlayCallback]
|
|
None
|
Source code in api/src/anipy_api/player/players/mpv.py
MpvControllable(play_callback=None, **mpv_args)
¶
Bases: PlayerBase
This player can be controlled and it also does not close if
the media is changed, the window stays open until kill_player
is called.
You need libmpv for this, check the python-mpv
project's requirements to know where to get it.
For detailed documentation about the functions have a look at the base class.
If you want to use the extra features of the controllable player look here for documentation (or use your LSP), the python-mpv mpv instance lives in the mpv attribute.
Attributes:
Name | Type | Description |
---|---|---|
mpv |
The python-mpv mpv instance |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
play_callback
|
Optional[PlayCallback]
|
Callback called upon starting to play a title with |
None
|
**mpv_args
|
Optional[Any]
|
Arguments passed to the MPV instance check the python-mpv repo or check the official list of arguments. There are some default arguments set, if you specify any arguments here, all the defaults will be discarded and this will be used instead. |
{}
|
Source code in api/src/anipy_api/player/players/mpv_control.py
Syncplay(player_path, extra_args=[], play_callback=None)
¶
Bases: SubProcessPlayerBase
The syncplay subprocess player class.
For detailed documentation about the functions and arguments have a look at the base class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
player_path
|
str
|
|
required |
extra_args
|
List[str]
|
|
[]
|
play_callback
|
Optional[PlayCallback]
|
|
None
|
Source code in api/src/anipy_api/player/players/syncplay.py
Vlc(player_path, extra_args=[], play_callback=None)
¶
Bases: SubProcessPlayerBase
The vlc subprocess player class.
For detailed documentation about the functions and arguments have a look at the base class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
player_path
|
str
|
|
required |
extra_args
|
List[str]
|
|
[]
|
play_callback
|
Optional[PlayCallback]
|
|
None
|
Source code in api/src/anipy_api/player/players/vlc.py
get_player(player, extra_args=[], play_callback=None)
¶
Get a fitting player class based on a player path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
player
|
Path
|
Path to the player |
required |
extra_args
|
List[str]
|
Extra arguments to pass to players that support it |
[]
|
play_callback
|
Optional[PlayCallback]
|
Callback called upon starting to play a title with |
None
|
Raises:
Type | Description |
---|---|
PlayerError
|
If the player is not found |
Returns:
Type | Description |
---|---|
PlayerBase
|
The player class |
Source code in api/src/anipy_api/player/player.py
list_players()
¶
List all available players. Note that is not really useful as not all of them have the same __init__
signature, better use get_player or directly import the players you want to use.
Yields:
Type | Description |
---|---|
Type[PlayerBase]
|
Player classes (that still need to be initialized) |