cordova-plugin-nativeaudio icon indicating copy to clipboard operation
cordova-plugin-nativeaudio copied to clipboard

no audio on iPhone running iOS 9.2

Open chicheongweng opened this issue 8 years ago • 3 comments

I am using Ionic with this plugin.

The below code works on an iPhone 6 emulator running iOS 9.2 and an actual android device. But when I run it on a real iPhone 5 running iOS 9.2 there is no audio. Any clue??

Here is my code snippet:

.run(function($ionicPlatform, PushNotificationsService, $rootScope, $ionicConfig, $timeout) { console.log('app.run'); $ionicPlatform.on("deviceready", function(){ // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) if(window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); }
if(window.StatusBar) { StatusBar.styleDefault(); }

if( window.plugins && window.plugins.NativeAudio ) { 

window.plugins.NativeAudio.preloadSimple( 'click', 'audio/driver.mp3',        function(msg){
    console.log('Playig click ...');
    window.plugins.NativeAudio.play('click');
    },    
    function(msg){
    console.log( 'error: ' + msg );
    }    
    );  
}   
PushNotificationsService.register();

});

chicheongweng avatar Jan 18 '16 08:01 chicheongweng

i also no longer have audio on iOS 9.2

nitzanwilnai avatar Feb 02 '16 22:02 nitzanwilnai

MP3's loaded via preloadComplex do play on iOS9.2, files loaded via preloadSimple do not We've been using this Cordova plugin since ages, and it still works great for Android, but it seems severely broken on iOS9.2. When calling the 'play' function, Xcode's debug console shows a "998: Failure to setup sound, err = -50" message.

av01d avatar Feb 03 '16 12:02 av01d

Same here, is there any solution?

bobvandevijver avatar Sep 28 '16 13:09 bobvandevijver