Class: Html5AudioOutput

Html5AudioOutput

mmir.env.media.Html5AudioOutput

Audio handling for web / HTML5 environment

Requires

  • module:window.URL

Members

protected,readonly_pluginName

Default Value:
  • "webAudio"

constantMediaErrorArray.<String>

Media error (codes): the corresponding code is their index.

Code 0 is an internal error code for unknown/unspecific error causes.
Codes 1 - 4 correspond to the HTML5 MediaError interface (which are the same as Cordova's Audio MediaError codes). The description texts are taken from the HTML5 documentation.

See:

Methods

Get an audio object for the audio file specified by URL URL or by WAV data. NOTE that getWAVAsAudio may not be supported by all modules! Convenience function for getURLAsAudio and getWAVAsAudio: if first argument is a String, then getURLAsAudio will be invoked, otherwise getWAVAsAudio (if the module supports this function).
See:

getURLAsAudio(url, onPlayedCallback, failureCallback, onLoadedCallback){mmir.env.media.IAudio}

Get an audio object for the audio file specified by URL. The audio object exports the following functions:
play()
stop()
release()
enable()
disable()
setVolume(number)
getDuration()
isPaused()
isEnabled()
NOTE: the audio object should only be used, after the onLoadedCallback was triggered.
Name Type Description
url String
onPlayedCallback function optional OPTIONAL
failureCallback function optional OPTIONAL
onLoadedCallback function optional OPTIONAL
See:
Returns:
Type Description
mmir.env.media.IAudio the audio

getWAVAsAudio()

See:
  • mmir.MediaManager#getWAVAsAudio
Play audio file from the specified URL or WAV data. Convenience function for playWAV and playURL: if first argument is a String, then playURL will be invoked, otherwise playWAV.
See:
Play audio file from the specified URL.
See:
Play PCM audio data.
See: