new lime.audio.Audio(filePath)
Audio stream object
Parameters:
Name | Type | Description |
---|---|---|
filePath |
string | Path to audio file. |
- Source:
- audio/audio.js, line 12
Summary
Members |
||
---|---|---|
baseElement :audio
Internal audio element
|
||
<private> |
loaded_ :bBoolean
|
|
<private> |
playing_ :boolean
|
Methods |
||
---|---|---|
isLoaded () → {boolean}
Returns true if audio file has been loaded
|
||
isPlaying () → {boolean}
Returns true if audio file is playing
|
||
<private> |
loadHandler_ ()
Handle loading the audio file. Event handlers seem to fail
on lot of browsers.
|
|
play (opt_loop)
Start playing the audio
|
||
stop ()
Stop playing the audio
|
Members
-
baseElement :audio
-
Internal audio element
- Source:
- audio/audio.js, line 44
-
<private> loaded_ :bBoolean
-
- Source:
- audio/audio.js, line 23
-
<private> playing_ :boolean
-
- Source:
- audio/audio.js, line 29
Methods
-
isLoaded() → {boolean}
-
Returns true if audio file has been loaded
- Source:
- audio/audio.js, line 155
Returns:
Audio has been loaded.- Type
- boolean
-
isPlaying() → {boolean}
-
Returns true if audio file is playing
- Source:
- audio/audio.js, line 163
Returns:
Audio is playing.- Type
- boolean
-
<private> loadHandler_()
-
Handle loading the audio file. Event handlers seem to fail on lot of browsers.
- Source:
- audio/audio.js, line 135
-
play(opt_loop)
-
Start playing the audio
Parameters:
Name Type Argument Description opt_loop
number <optional>
Loop the sound. - Source:
- audio/audio.js, line 171
-
stop()
-
Stop playing the audio
- Source:
- audio/audio.js, line 211