Class Index | File Index

Classes


Class R.sound.HTML5


Extends R.sound.AbstractSoundSystem.
Initializes the HTML5 sound system. The sound types supported by the HTML5 sound system are determined by file extension on the URL:


Defined in: html5.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
destroySound(sound)
Destroy the given sound object
 
Get the length (duration) of the sound object, in milliseconds
 
Get the position, in milliseconds, within a playing or paused sound
 
Determine if the sound object is ready to be used
 
getSoundSize(sound)
Get the size of the sound object, in bytes (unsupported in HTML5)
 
muteSound(sound)
Mute the given sound object
 
pauseSound(sound)
Pause the given sound object
 
playSound(sound)
Play the given sound object
 
resumeSound(sound)
Resume the given sound object
 
setSoundPan(sound, pan)
Pan the given sound object from left to right (unsupported in HTML5)
 
setSoundPosition(sound, millisecondOffset)
Set the position, within the sound's length, to play at
 
setSoundVolume(sound, volume)
Set the volume of the given sound object
 
stopSound(sound)
Stop the given sound object
 
unmuteSound(sound)
Unmute the given sound object
 
verifyType(mime)
Verify if the given type can be played
Methods borrowed from class R.sound.AbstractSoundSystem:
isReady, loadSound, shutdown
Class Detail
R.sound.HTML5()
Method Detail
destroySound(sound)
Destroy the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

{Number} getSoundDuration(sound)
Get the length (duration) of the sound object, in milliseconds
Parameters:
sound
{R.resources.types.Sound} The sound object
Returns:
{Number}

{Number} getSoundPosition(sound)
Get the position, in milliseconds, within a playing or paused sound
Parameters:
sound
{R.resources.types.Sound} The sound object
Returns:
{Number}

{Boolean} getSoundReadyState(sound)
Determine if the sound object is ready to be used
Parameters:
sound
{R.resources.types.Sound} The sound object
Returns:
{Boolean} true if the sound is ready

{Number} getSoundSize(sound)
Get the size of the sound object, in bytes (unsupported in HTML5)
Parameters:
sound
{R.resources.types.Sound} The sound object
Returns:
{Number}

muteSound(sound)
Mute the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

pauseSound(sound)
Pause the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

playSound(sound)
Play the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

resumeSound(sound)
Resume the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

setSoundPan(sound, pan)
Pan the given sound object from left to right (unsupported in HTML5)
Parameters:
sound
{R.resources.types.Sound} The sound object
pan
{Number} A value between -100 and 100, with -100 being full left and zero being center

setSoundPosition(sound, millisecondOffset)
Set the position, within the sound's length, to play at
Parameters:
sound
{R.resources.types.Sound} The sound object
millisecondOffset
{Number} The millisecond offset from the start of the sounds duration

setSoundVolume(sound, volume)
Set the volume of the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object
volume
{Number} A value between 0 and 100, with 0 being muted

stopSound(sound)
Stop the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

unmuteSound(sound)
Unmute the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

verifyType(mime)
Verify if the given type can be played
Parameters:
mime

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:20 GMT-0400 (EDT)