I'm using Icenium Mist, and the cordova.js it includes is pretty streamlined and small and I can't find the definition of the Media object I'm hoping to use.
What .js Do I Need to Include to Access Cordova's Media object?
113 views Asked by blaster At
2
Media object is provided in a plugin. You need to include this one: https://github.com/apache/cordova-plugin-media Not sure how to do it with Icenium Mist but with the command line tools it is: Cordova plugin add org.apache.cordova.media
See http://cordova.apache.org/docs/en/3.3.0/cordova_media_media.md.html#Media for more details. And here for http://docs.icenium.com/creating-your-project/using-plugins/working-with-plugins for more details about adding the plugin
Edit: If I read the docs for icenium correctly you need to do the following:
Edit2:
Does it work when you execute it in the deviceready event like this:
of course changing the parameters to your need