Phonegap Media Plugin在Windows Phone 8中不起作用

时间:2015-10-14 11:24:08

标签: cordova phonegap-plugins

我在我的应用中使用cordova 3.8.0。 Cordova的Media插件在Windows Phone 8中不起作用。我收到此错误。

'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Xna.Framework.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

我的代码:

if(my_media != null) 
    { 
        my_media.release(); 
        my_media = null; 
    }
    var mypath = location.pathname;
    console.log("mypath=====" + mypath);
    var idx = mypath.lastIndexOf('/');
    console.log("idx=====" + idx);
    //var src = mypath.substring(0, idx + 1) + "flipSound.wav";
    var src = "/flipSound.wav";
    console.log("src=====" + src);
    my_media = new Media(src, onSuccess, onError); 
    my_media.play();

 function onSuccess() {
    console.log("playAudio():Audio Success");
}

function onError(error) {
    console.log('code: '    + error.code    + '\n' +
          'message: ' + error.message + '\n');
}

0 个答案:

没有答案