mediaplayer

The mediaplayer module contains the MediaPlayer class.

class openlp.core.ui.media.mediaplayer.MediaPlayer(parent, name='media_player')[source]

Bases: openlp.core.common.registryproperties.RegistryProperties

This is the base class media Player class to provide OpenLP with a pluggable media display framework.

check_available()[source]

Player is available on this machine

get_info()[source]

Returns Information about the player

get_live_state()[source]

Get the state of the live player :return: Live state

get_media_display_css()[source]

Add css style sheets to htmlbuilder

get_media_display_html()[source]

Add html code to htmlbuilder

get_media_display_javascript()[source]

Add javascript functions to htmlbuilder

get_preview_state()[source]

Get the state of the preview player :return: Preview State

load(display)[source]

Load a new media file and check if it is valid

Parameters:display – The display to be updated.
pause(display)[source]

Pause of current Media File

Parameters:display – The display to be updated.
play(display)[source]

Starts playing of current Media File

Parameters:display – The display to be updated.
reset(display)[source]

Remove the current loaded video

Parameters:display – The display to be updated.
resize(display)[source]

If the main display size or position is changed, the media widgets should also resized

Parameters:display – The display to be updated.
seek(display, seek_value)[source]

Change playing position of current Media File

Parameters:
  • display – The display to be updated.
  • seek_value – The where to seek to.
set_live_state(state)[source]

Set the State of the Live player :param state: State to be set :return: None

set_preview_state(state)[source]

Set the state of the Preview Player :param state: State to be set :return: None

set_state(state, display)[source]

Set the State based on the display being processed :param state: State to be set :param display: Identify the Display type :return: None

set_visible(display, status)[source]

Show/Hide the media widgets

Parameters:
  • display – The display to be updated.
  • status – The status to be set.
setup(display)[source]

Create the related widgets for the current display

Parameters:display – The display to be updated.
stop(display)[source]

Stop playing of current Media File

Parameters:display – The display to be updated.
update_ui(display)[source]

Do some ui related stuff (e.g. update the seek slider)

Parameters:display – The display to be updated.
volume(display, volume)[source]

Change volume of current Media File

Parameters:
  • display – The display to be updated.
  • volume – The volume to set.