VLC Module Reference
Classes:
|
VLC's top level scripting object. |
|
A document open in VLC.app. |
|
A wrapper around a list of documents. |
|
A window of VLC.app. |
- class PyXA.apps.VLC.XAVLCApplication(properties)[source]
Bases:
XASBApplication
,XACanOpenPath
,XACanPrintPath
VLC’s top level scripting object.
New in version 0.0.8.
Classes:
ObjectType
(value)Types of objects that can be created using
make()
.Methods:
Activates the currently focused menu item.
documents
([filter])Returns a list of documents, as PyXA objects, matching the given filter.
Toggle between fullscreen and windowed mode.
get_url
(url)Get a URL without playing it.
make
(specifier, properties[, data])Creates a new element of the given specifier class without adding it to any list.
Moves the menu focus down.
Moves the menu focus to the left.
Moves the menu focus to the right.
Moves the menu focus up.
mute
()Mute the audio of the item or unmute it if it was muted.
next
()Go to the next item in the playlist or the next chapter in the DVD/VCD.
open
(target)Opens the file/website at the given filepath/URL.
open_url
(url)Open a media URL.
play
()Start playing the current playlistitem or pause it when it is already playing.
previous
()Go to the previous item in the playlist or the previous chapter in the DVD/VCD.
Step the current playlist item backward the specified step width (default is 2) (1=extraShort, 2=short, 3=medium, 4=long).
Step the current playlist item forward the specified step width (default is 2) (1=extraShort, 2=short, 3=medium, 4=long).
stop
()Stop playing the current playlist item.
Bring the volume down by one step.
Bring the volume up by one step.
Attributes:
The audio desynchronization preference from -2147483648 to 2147483647, where 0 is default.
The volume of the current playlist item from 0 to 512, where 256 is 100%.
The current time of the current playlist item in seconds.
The duration of the current playlist item in seconds.
Whether VLC is the active application.
Indicates whether fullscreen is enabled or not.
Is VLC currently muted?
The name of the application.
Name of the current playlist item.
Path to the current playlist item.
Indicates whether a DVD menu is currently being shown.
Is VLC playing an item?
All properties of the VLC application.
The version of VLC.app.
- class ObjectType(value)[source]
Bases:
Enum
Types of objects that can be created using
make()
.Attributes:
- document = 'document'
Activates the currently focused menu item.
New in version 0.0.8.
- property audio_desync: int
The audio desynchronization preference from -2147483648 to 2147483647, where 0 is default.
- property audio_volume: int
The volume of the current playlist item from 0 to 512, where 256 is 100%.
- property current_time: int
The current time of the current playlist item in seconds.
- documents(filter: dict | None = None) XAVLCDocumentList [source]
Returns a list of documents, as PyXA objects, matching the given filter.
- Parameters:
filter (dict, optional) – Keys and values to filter documents by, defaults to None
- Returns:
A PyXA list object wrapping a list of documents
- Return type:
New in version 0.0.8.
- property duration_of_current_item: int
The duration of the current playlist item in seconds.
- property frontmost: bool
Whether VLC is the active application.
- property fullscreen_mode: bool
Indicates whether fullscreen is enabled or not.
- make(specifier: str | ObjectType, properties: dict, data: Any | None = None)[source]
Creates a new element of the given specifier class without adding it to any list.
- Parameters:
specifier (Union[str, XAArcApplication.ObjectType]) – The classname of the object to create
properties (dict) – The properties to give the object
data (Any) – The data to give the object
- Returns:
A PyXA wrapped form of the object
- Return type:
New in version 0.0.9.
Moves the menu focus down.
New in version 0.0.8.
Moves the menu focus to the left.
New in version 0.0.8.
Moves the menu focus to the right.
New in version 0.0.8.
Moves the menu focus up.
New in version 0.0.8.
- property muted: bool
Is VLC currently muted?
- property name: str
The name of the application.
- property name_of_current_item: str
Name of the current playlist item.
- next()[source]
Go to the next item in the playlist or the next chapter in the DVD/VCD.
New in version 0.0.8.
- open(target: XAURL | XAPath | str) None [source]
Opens the file/website at the given filepath/URL.
- Parameters:
target (Union[XABase.XAURL, XABase.XAPath, str]) – The path to a file or the URL to a website to open.
- Example 1:
Open files from file paths
>>> import PyXA >>> app = PyXA.Application("VLC") >>> app.open("/Users/exampleUser/Downloads/Example.avi") >>> >>> path = PyXA.XAPath("/Users/exampleUser/Documents/Example.m4v") >>> app.open(path)
- Example 2:
Open URLs
>>> import PyXA >>> app = PyXA.Application("VLC") >>> app.open("https://upload.wikimedia.org/wikipedia/commons/transcoded/0/0f/Baby_pelican.ogg/Baby_pelican.ogg.mp3") >>> >>> url = PyXA.XAURL("https://www.youtube.com/watch?v=e9B3E_DnnWw") >>> app.open(url)
New in version 0.0.8.
- play()[source]
Start playing the current playlistitem or pause it when it is already playing.
New in version 0.0.8.
Indicates whether a DVD menu is currently being shown.
- property playing: bool
Is VLC playing an item?
- previous()[source]
Go to the previous item in the playlist or the previous chapter in the DVD/VCD.
New in version 0.0.8.
- property properties: dict
All properties of the VLC application.
- step_backward()[source]
Step the current playlist item backward the specified step width (default is 2) (1=extraShort, 2=short, 3=medium, 4=long).
New in version 0.0.8.
- step_forward()[source]
Step the current playlist item forward the specified step width (default is 2) (1=extraShort, 2=short, 3=medium, 4=long).
New in version 0.0.8.
- property version: str
The version of VLC.app.
- class PyXA.apps.VLC.XAVLCDocument(properties)[source]
Bases:
XAObject
A document open in VLC.app.
Attributes:
Has the document been modified since the last save?
The document's name.
The document's path.
All properties of the document.
- property modified: bool
Has the document been modified since the last save?
- property name: str
The document’s name.
- property properties: dict
All properties of the document.
- class PyXA.apps.VLC.XAVLCDocumentList(properties: dict, filter: dict | None = None)[source]
Bases:
XAList
,XACloseable
,XAClipboardCodable
A wrapper around a list of documents.
New in version 0.0.8.
Methods:
by_modified
(modified)by_name
(name)by_path
(path)Gets a clipboard-codable representation of each document in the list.
modified
()name
()path
()- by_modified(modified: bool) XAVLCDocument | None [source]
- by_name(name: str) XAVLCDocument | None [source]
- by_path(path: str | XAPath) XAVLCDocument | None [source]
- get_clipboard_representation() list[str] [source]
Gets a clipboard-codable representation of each document in the list.
When the clipboard content is set to a list of documents, the name of each document is added to the clipboard.
- Returns:
A list of document names
- Return type:
list[str]
New in version 0.0.8.
- class PyXA.apps.VLC.XAVLCWindow(properties)[source]
Bases:
XASBWindow
A window of VLC.app.
New in version 0.0.8.
Attributes:
The document whose contents are being displayed in the window.
Whether the window floats.
Whether the window is the application's current modal window.
Whether the window has a title bar.
- property document: XAVLCDocument
The document whose contents are being displayed in the window.
- property floating: bool
Whether the window floats.
- property modal: bool
Whether the window is the application’s current modal window.
- property titled: bool
Whether the window has a title bar.