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 StreamingMedia.StreamingMedia(system, config, stype=None)¶
StreamingMedia allows a <no title> to interact with any type of Streaming Media source, e.g., YouTube or MediaGoblin, by only focusing on the high level tasks to accomplish, and letting a sub class decide how to carry out those tasks for the specific site being used.
Parameters:
system: a <no title> object to communicate with the target system
config: a <no title> object holding all our configuration
stype: optionally the (string) name of the type of client to create, overriding anything in the config object
- comment(msg)¶
Add a comment to the currently viewed media, if possible.
Parameters:
msg: the message to leave as a comment, which should be a string to be typed
- consume(media)¶
Have the user consume the given media, whether by watching the video or listening to the music of whatever makes sense for this stream.
Parameters:
media: the identifier by which the User will find the desired media
- consume_random()¶
Pick one of the available media options and consume it.
- upload(path, title, description='', tags=(), extra=())¶
Uplaod a new piece of media to the site.
Parameters:
path: the string path to the file to upload
title: the string title of this piece of media
description: the optional string description of this media
tags: an optional list of strings that are the tags for this mdeia
extra: an optional argument that is for site specific extra info