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
getURLAsAudioandgetWAVAsAudio: if first argument is a String, thengetURLAsAudiowill 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 theonLoadedCallbackwas triggered.Name Type Description urlString onPlayedCallbackfunction optional OPTIONAL failureCallbackfunction optional OPTIONAL onLoadedCallbackfunction optional OPTIONAL Returns:
Type Description mmir.env.media.IAudio the audio -
initialize()
-
-
play()
-
playURL()
-
playWAV()
-
Play PCM audio data.