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
-
getAudio()
-
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
andgetWAVAsAudio
: if first argument is a String, thengetURLAsAudio
will be invoked, otherwisegetWAVAsAudio
(if the module supports this function). -
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 theonLoadedCallback
was triggered.Name Type Description url
String onPlayedCallback
function optional OPTIONAL failureCallback
function optional OPTIONAL onLoadedCallback
function optional OPTIONAL Returns:
Type Description mmir.env.media.IAudio the audio -
initialize()
-
-
play()
-
playURL()
-
playWAV()
-
Play PCM audio data.