VLC Module Reference

Classes:

XAVLCApplication(properties)

VLC's top level scripting object.

XAVLCDocument(properties)

A document open in VLC.app.

XAVLCDocumentList(properties[, filter])

A wrapper around a list of documents.

XAVLCWindow(properties)

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:

activate_menu_item()

Activates the currently focused menu item.

documents([filter])

Returns a list of documents, as PyXA objects, matching the given filter.

fullscreen()

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.

move_menu_focus_down()

Moves the menu focus down.

move_menu_focus_left()

Moves the menu focus to the left.

move_menu_focus_right()

Moves the menu focus to the right.

move_menu_focus_up()

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_backward()

Step the current playlist item backward the specified step width (default is 2) (1=extraShort, 2=short, 3=medium, 4=long).

step_forward()

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.

volume_down()

Bring the volume down by one step.

volume_up()

Bring the volume up by one step.

Attributes:

audio_desync

The audio desynchronization preference from -2147483648 to 2147483647, where 0 is default.

audio_volume

The volume of the current playlist item from 0 to 512, where 256 is 100%.

current_time

The current time of the current playlist item in seconds.

duration_of_current_item

The duration of the current playlist item in seconds.

frontmost

Whether VLC is the active application.

fullscreen_mode

Indicates whether fullscreen is enabled or not.

muted

Is VLC currently muted?

name

The name of the application.

name_of_current_item

Name of the current playlist item.

path_of_current_item

Path to the current playlist item.

playback_shows_menu

Indicates whether a DVD menu is currently being shown.

playing

Is VLC playing an item?

properties

All properties of the VLC application.

version

The version of VLC.app.

class ObjectType(value)[source]

Bases: Enum

Types of objects that can be created using make().

Attributes:

document

document = 'document'
activate_menu_item()[source]

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:

XAVLCDocumentList

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.

fullscreen()[source]

Toggle between fullscreen and windowed mode.

New in version 0.0.8.

property fullscreen_mode: bool

Indicates whether fullscreen is enabled or not.

get_url(url: XAURL | XAPath | str)[source]

Get a URL without playing it.

New in version 0.0.8.

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:

XABase.XAObject

New in version 0.0.9.

move_menu_focus_down()[source]

Moves the menu focus down.

New in version 0.0.8.

move_menu_focus_left()[source]

Moves the menu focus to the left.

New in version 0.0.8.

move_menu_focus_right()[source]

Moves the menu focus to the right.

New in version 0.0.8.

move_menu_focus_up()[source]

Moves the menu focus up.

New in version 0.0.8.

mute()[source]

Mute the audio of the item or unmute it if it was muted.

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.

open_url(url: XAURL | XAPath | str)[source]

Open a media URL.

New in version 0.0.8.

property path_of_current_item: XAPath

Path to the current playlist item.

play()[source]

Start playing the current playlistitem or pause it when it is already playing.

New in version 0.0.8.

property playback_shows_menu: bool

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.

stop()[source]

Stop playing the current playlist item.

New in version 0.0.8.

property version: str

The version of VLC.app.

volume_down()[source]

Bring the volume down by one step. There are 32 steps from 0 to 400% volume.

New in version 0.0.8.

volume_up()[source]

Bring the volume up by one step. There are 32 steps from 0 to 400% volume.

New in version 0.0.8.

class PyXA.apps.VLC.XAVLCDocument(properties)[source]

Bases: XAObject

A document open in VLC.app.

Attributes:

modified

Has the document been modified since the last save?

name

The document's name.

path

The document's path.

properties

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 path: XAPath

The document’s path.

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)

get_clipboard_representation()

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.

modified() list[bool][source]
name() list[str][source]
path() list[XAPath][source]
class PyXA.apps.VLC.XAVLCWindow(properties)[source]

Bases: XASBWindow

A window of VLC.app.

New in version 0.0.8.

Attributes:

document

The document whose contents are being displayed in the window.

floating

Whether the window floats.

modal

Whether the window is the application's current modal window.

titled

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.