cordova-plugin-nativeaudio
cordova-plugin-nativeaudio copied to clipboard
Sound is still on while silent switch on iOS
Hi,
this is a great awesome plugin!
There is a small issue on iOS.
The silent switch (on iPhone) has no functions. The sound is still on. Just the volume buttons are working.
Is there a Javascript callback to detect changes by the silent switch to handle it selfs?
I use the Intel XDK for buildings.
Best regards from Germany DJAB1978
PS: Sry for the bad English :)
Anything here? Seems that this is the new bug, version 3.0.2
from npm is OK.
Seems that https://github.com/floatinghotpot/cordova-plugin-nativeaudio/commit/c72e147427bf49e5978d36f14330e28575313971 is the issue
Same problem here.
After installing version 3.0.2
the sounds are not playing at all though.
same problem here
using 3.0.2 does fix it for me, thanks @Ajaxy
...actually, 3.0.2 has a couple of issues such as looped sounds dont stop playing, also not all of my sounds can play anymore since i switched to this version
ok so this seems to fix it
- clone this project to your local disk
- open src/ios/NativeAudio.m
- delete line 47 [session setCategory:AVAudioSessionCategoryPlayback error:nil];
- add the plugin locally cordova plugin add ~/somelocation/cordova-plugin-nativeaudio
@adekbadek android or ios?
@Ajaxy iOS
@adekbadek strange, works for me. Not on emulator though.
Any update on this?
Can we get an option to set the Audio Session Category instead of just having it default to AVAudioSessionCategoryPlayback? AVAudioSessionCategoryAmbient and AVAudioSessionCategorySoloAmbient would be useful as well.
Someone solved this problem?
I use different versions for iOS and Android and it's annoying :( сб, 10 дек. 2016 г. в 0:42, pavei [email protected]:
Someone solved this problem?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/floatinghotpot/cordova-plugin-nativeaudio/issues/82#issuecomment-266131324, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVzIQV9f2PJ4cDwk06Lqt2B3tqGTuRDks5rGcs7gaJpZM4IKa3O .
@Ajaxy which version are you using on iOS?
3.0.3
Still not working on iOS 10 :(
Hi, i also need to find a way to stop sounds playing when silent switch on iOS ( plugin v3.0.7 ), Anyone found one ?
@geshub, I did the same steps that @greneham listed and now it's working for me on iOS 10.
Would it be possible to commit @greneham code to the plugin ?
@floatinghotpot Bump
According to Apple API documentation, AVAudioSessionCategoryPlayback won't honor the silent switch. Replace it with AVAudioSessionCategoryAmbient, and the mute switch will do what you expect.
I've branched the plugin and it works for me. See https://github.com/MartinDomig/cordova-plugin-nativeaudio/commit/ba2e1240f41a825ba3e149d8da4f4aaa77499d8d
A HUGE thanks to @MartinDomig for this fork. I have tested it on iPhone 6 w iOS 10 and it fixes both the following issues:
- Sounds still playing when iPhone is on mute
- Existing audio stopped on app init
Awesome work
Could we merge the changes to the plugin ?
I've just created a pull request - there isn't much more I can do. The maintainer of this repository would have to accept it.
https://github.com/floatinghotpot/cordova-plugin-nativeaudio/pull/123
I think you should use the option MixWithOthers otherwise the muisc is ducked but not restored to it's original volume when starting the app
I am trying to get an extra function in so that you can change the catagory what you want the player and other players are going to do but still not no succes
btw This is the first Phonegap plugin that I am working on
Any update on this?
Any update on this?