Cordova媒体插件不适用于ios

时间:2017-06-26 12:19:51

标签: android ios cordova phonegap-plugins cordova-plugins

我在我的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>

0 个答案:

没有答案