media/ActiveMediaBag. ActiveMediaBag

This class stores a collection of realized ActiveMediaPlayer objects, related to a
JClicProject or Activity.

Constructor

new ActiveMediaBag()

ActiveMediaBag constructor

Members

players :Array.<module:media/ActiveMediaPlayer.ActiveMediaPlayer>

The collection of ActiveMediaPlayer objects stored in this media bag.

Methods

createActiveMediaPlayer(mc, mb, ps) → {module:media/ActiveMediaPlayer.ActiveMediaPlayer}

Creates a new ActiveMediaPlayer linked to this media bag

Parameters:
NameTypeDescription
mcmodule:media/MediaContent.MediaContent

The content used by the new player

mbmodule:bags/MediaBag.MediaBag

The project's MediaBag

psmodule:JClicPlayer.JClicPlayer

An object implementing the
PlayStation interface,
usually a JClicPlayer.

getActiveMediaPlayer(mc, mb, ps) → {module:media/ActiveMediaPlayer.ActiveMediaPlayer}

Looks for an already existing ActiveMediaPlayer equivalent to the requested.
When not found, a new one is created and and returned.

Parameters:
NameTypeDescription
mcmodule:media/MediaContent.MediaContent

The content used by the new player

mbmodule:bags/MediaBag.MediaBag

The project's MediaBag

psmodule:JClicPlayer.JClicPlayer

An object implementing the
PlayStation interface,
usually a JClicPlayer.

realizeAll()

Realizes all the media elements stored in this bag

removeActiveMediaPlayer(mc)

Removes from the list of players the ActiveMediaPlayer related to the specified module:media/MediaContent.MediaContent.

Parameters:
NameTypeDescription
mcmodule:media/MediaContent.MediaContent

The media content to look for.

removeAll()

Removes all players from this media bag

stopAll(level)

Stops playing all media elements stored in this bag

Parameters:
NameTypeDescription
levelnumber

Level at and below what all media players will be muted.