我在我的Kendo移动应用程序中使用cordova媒体插件。它是唯一的Android工作,但当我在ios中尝试它不工作。
我的代码:
Media.js file inside the www root floder of plugin
cordova.define("cordova/plugin/ExternalMedia", function (require, exports,
module) {
Media.prototype.start= function () {}
Media.prototype.stop= function () {}
Media.prototype.play = function () {}
Media.prototype.pause= function () {}
this is code inside plugin file media.js file in wwww root folder
});
<script>
var externalmedia;
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
alert("ios")
//here i am calling the plugin,Its display all the methods inside
the cordova/plugin/ExternalMedia file for android, but for ios its not
working
externalmedia = cordova.require("cordova/plugin/ExternalMedia");
alert(externalmedia);
}
</script>