mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-12-25 14:51:37 +00:00
Merge branch 'master' of bitbucket.org:TheBosZ/cordova-plugin-run-in-background
This commit is contained in:
commit
b33044c8e5
@ -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];
|
||||
@ -221,8 +224,8 @@ NSString* const kAPPBackgroundEventDeactivate = @"deactivate";
|
||||
|
||||
NSString* flag = [NSString stringWithFormat:@"%@._isActive=%@;",
|
||||
kAPPBackgroundJsNamespace, active];
|
||||
|
||||
NSString* depFn = [NSString stringWithFormat:@"%@.on%@();",
|
||||
|
||||
NSString* depFn = [NSString stringWithFormat:@"%@.on('%@');",
|
||||
kAPPBackgroundJsNamespace, event];
|
||||
|
||||
NSString* fn = [NSString stringWithFormat:@"%@.fireEvent('%@');",
|
||||
|
Loading…
Reference in New Issue
Block a user