Constructor
new EventSoundsElement(id, fileopt)
EventSoundsElement constructor
Name | Type | Attributes | Description |
---|---|---|---|
id | string | The identifier of this media sound | |
file | string | <optional> | An optional file name or URL containing the sound data |
Members
audio :external:HTMLAudioElement
HTMLAudioElement used to play this sound
enabled :number
Whether the sound for this event is enabled or not
- number
file :string
The name of the sound file used by this element
- string
player :module:media/ActiveMediaPlayer.ActiveMediaPlayer
Media player used to play this sound
Methods
getAttributes() → {object}
Gets a object with the basic attributes needed to rebuild this instance excluding functions,
parent references, constants and also attributes retaining the default value.
The resulting object is commonly usued to serialize elements in JSON format.
- The resulting object, with minimal attrributes
- Type:
- object
play()
Plays the audio associated to this event
realize(ps, mediaBag)
Instantiates this audio object
Name | Type | Description |
---|---|---|
ps | module:JClicPlayer. | |
mediaBag | module:bags/MediaBag. |
setAttributes(data) → {module:media/EventSoundsElement.EventSoundsElement}
Reads the properties of this EventSoundsElement from a data object
Name | Type | Description |
---|---|---|
data | object | The data object to be parsed |
setProperties($xml)
Reads the properties of this object from an XML element
Name | Type | Description |
---|---|---|
$xml | external:jQuery | The XML element to be parsed |
stop()
Stops playing the audio associated to this event