ActiveMediaBag

Source: ActiveMediaBag.js:39

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


Constructor

new ActiveMediaBag(): ActiveMediaBag

ActiveMediaBag constructor


Instance Methods

createActiveMediaPlayer( mc: module:media/MediaContent.MediaContent, mb: module:bags/MediaBag.MediaBag, ps: module:JClicPlayer.JClicPlayer, ): module:media/ActiveMediaPlayer.ActiveMediaPlayer

Creates a new ActiveMediaPlayer linked to this media bag

Parameters

Returns

getActiveMediaPlayer( mc: module:media/MediaContent.MediaContent, mb: module:bags/MediaBag.MediaBag, ps: module:JClicPlayer.JClicPlayer, ): 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

Returns

removeActiveMediaPlayer( mc: module:media/MediaContent.MediaContent, )

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

Parameters

realizeAll()

Realizes all the media elements stored in this bag

stopAll(level: number)

Stops playing all media elements stored in this bag

Parameters

  • level (number) — Level at and below what all media players will be muted.

removeAll()

Removes all players from this media bag

Instance Fields

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

The collection of ActiveMediaPlayer objects stored in this media bag.