ConsoleUser

Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com

This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.

All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.

class MediaPlayerImpl.MediaPlayerImpl(system, config)

This calss is the public interface by which a <no title> can access the media player. This class abstracts away the actual client being used.

Parameters:

  • system: a <no title> object to communicate with the target system

  • config: a <no title> object hold all our configuration

is_playing()

Return: True iff there seems to be something playing currently

load(addr)

Load a resource for playing. The resource may be the path to a file or a URI or anything else that makes sense for the actual media player that is performing the actions.

Parameters:

  • addr: the address of the resource to load

play()

Play the loaded file, if it hasn’t already started.

stop()

Stop the playing file/stream if there is one.

MediaPlayerImpl.get_media_player(system, config, m_type=None)

I am a Factory method for creating instances of <no title> to be the _client member of <no title>.

Parameters:

  • system: the <no title> object which the instance should use

    to interact with the target system

  • config: the <no title> object defining this user

  • m_type: optionally the type of <no title>

    overriding any value specified in the config object