Constructor
new EventSounds(parentopt)
EventSounds constructor
Name | Type | Attributes | Description |
---|---|---|---|
parent | module:media/EventSounds. | <optional> | Another EventSounds object that will act as a parent of this one, |
- Source
Members
elements :object
Collection of EventSoundsElement
objects
- object
- Source
enabled :number
Whether this event sounds are enabled or not
- number
- Source
globalEnabled :boolean
This attribute is intended to be used at prototype level, to indicate a globally disabled
or enabled state.
- boolean
- Source
(static) MEDIA :object
Audio data for default event sounds
- object
- Source
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.
- Source
- The resulting object, with minimal attrributes
- Type:
- object
play(eventName)
Plays a specific event sound
Name | Type | Description |
---|---|---|
eventName | string | The identifier of the event to be played |
- Source
realize(ps, mediaBag)
Instantiates the audio objects needed to play event sounds
Name | Type | Description |
---|---|---|
ps | module:JClicPlayer. | |
mediaBag | module:bags/MediaBag. |
- Source
setAttributes(data) → {module:media/EventSounds.EventSounds}
Reads the properties of this EventSounds from a data object
Name | Type | Description |
---|---|---|
data | object | The data object to be parsed |
- Source
setProperties($xml)
Reads the object properties from an XML element
Name | Type | Description |
---|---|---|
$xml | external:jQuery | The XML element to be parsed |
- Source