Class: CordovaAudioOutput

CordovaAudioOutput

mmir.env.media.CordovaAudioOutput

Audio handling for Cordova environment

Requires

  • module:cordova-plugin-media
  • module:window.URL

Members

protected,readonly_pluginName

Default Value:
  • "cordovaAudio"

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
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:
See:
Play PCM audio data.
See: