mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-11-22 15:24:54 +00:00
Merged in JesperBalslev/cordova-plugin-run-in-background (pull request #5)
Prevent sound/music from stopping when opening the app on iOS. Also prevents embedded videos (youtube) from pausing when unmuted. * Previous fix wasn't backwards compatible with versions older than 12.2. This fixes it. * Fixes iOS issues with backgroundMode.onactivate and backgroundMode.ondeactivate * Prevent sound/music from stopping when opening the app on iOS. Also prevents embedded videos (youtube) from pausing when unmuted. Approved-by: Nathan Kerr <nathankerr@gmail.com>
This commit is contained in:
parent
1dab2de6ec
commit
77767cab9b
@ -174,6 +174,9 @@ NSString* const kAPPBackgroundEventDeactivate = @"deactivate";
|
||||
// even another app starts playing sound
|
||||
[session setCategory:AVAudioSessionCategoryPlayback
|
||||
error:NULL];
|
||||
// Prevent sound/music from stopping when opening the app. Also prevents embedded videos from pausing when unmuted.
|
||||
[session setCategory:AVAudioSessionCategoryAmbient
|
||||
error:NULL];
|
||||
|
||||
// Active the audio session
|
||||
[session setActive:YES error:NULL];
|
||||
|
Loading…
Reference in New Issue
Block a user