Class Sound
Defined in: sound.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Sound(primaryid)
Creates an instance of the Sound module
|
Field Attributes | Field Name and Description |
---|---|
<static> |
Sound.altID
Sound alternate audio ID.
|
<static> |
Sound.primaryID
Sound primary audio ID.
|
Method Attributes | Method Name and Description |
---|---|
play()
Play sound from primary or alternate ID based on HTML5 sound support.
|
|
setAltSound(aID)
Set alternative sound ID from Audio element ID stored in page.
|
|
setPrimarySound(pID)
Set primary sound ID from Audio element ID stored in page.
|
Class Detail
Sound(primaryid)
Creates an instance of the Sound module
- Parameters:
- {String} primaryid
- Primary sound ID from Audio element stored on page.
- See:
- sound.js
Field Detail
<static>
{String}
Sound.altID
Sound alternate audio ID. (From element stored in page).
<static>
{String}
Sound.primaryID
Sound primary audio ID. (From element stored in page).
Method Detail
play()
Play sound from primary or alternate ID based on HTML5 sound support.
setAltSound(aID)
Set alternative sound ID from Audio element ID stored in page.
- Parameters:
- {String} aID
- ID of Audio element.
setPrimarySound(pID)
Set primary sound ID from Audio element ID stored in page.
- Parameters:
- {String} pID
- ID of Audio element.