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

Sound muted in standby

Open nimo862 opened this issue 9 years ago • 8 comments

Hi, I noticed that the sound stops to play when the phone goes in standby mode, or also when - on android - the home button is pressed. Is it possible to fix this, and have the sound playing also in standby?

Thanks

nimo862 avatar May 25 '15 21:05 nimo862

The behavior was intensionally designed, stop playing audio when app go to background.

What's your use case for the requirement?

floatinghotpot avatar May 26 '15 01:05 floatinghotpot

I'm developing an app to play guided meditations. I need to use this library because I must play in background a mix of different loops containing relaxing sounds, like beach waves, birds, wind, chimes, etc.

nimo862 avatar May 26 '15 07:05 nimo862

Apart from cordova, iOS sound logic is already pretty complicated and not well documented in my opinion, you might achieve what you want by manually editing the plugin and modifying the AVAudioSession

kaansoral avatar Jun 12 '15 21:06 kaansoral

+1 Same here. Maybe if you create some options to turn of the onPause event.

calebeaires avatar Sep 18 '15 18:09 calebeaires

+1 for new feature (keep playing sound if app is inactive)!

eworker2003 avatar Dec 27 '15 20:12 eworker2003

+1 for new feature (keep playing sound if app is inactive)!

iliasbhal avatar Jan 18 '16 21:01 iliasbhal

+1 for new feature (keep playing sound if app is inactive)!

Neotrixsx avatar Apr 27 '16 10:04 Neotrixsx

+1 for new feature (keep playing sound if app is inactive)!

XaviGriso avatar Aug 19 '16 10:08 XaviGriso