Skip to content

Commit

Permalink
[CRD iOS] Allow host audio to mix with sounds from other apps
Browse files Browse the repository at this point in the history
Some users complain about background audio player being muted by the app.
This CL overrides some settings in the AudioSession to allow audio from
the app to be mixed with sounds from other apps.

Bug: 868088
Change-Id: I10af925e3eb488498ab83df25cbd77cea8ebd186
Reviewed-on: https://chromium-review.googlesource.com/1152182
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578472}
  • Loading branch information
ywh233 authored and Commit Bot committed Jul 26, 2018
1 parent 8927190 commit 3964dba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions remoting/ios/app/app_delegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "remoting/ios/app/app_delegate.h"

#import <AVFoundation/AVFoundation.h>

#import "remoting/ios/app/app_initializer.h"
#import "remoting/ios/app/app_view_controller.h"
#import "remoting/ios/app/first_launch_view_presenter.h"
Expand Down Expand Up @@ -48,6 +50,10 @@ - (BOOL)application:(UIApplication*)application
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
[self launchRootViewController];
[RemotingTheme applyColorSchemes];
[AVAudioSession.sharedInstance
setCategory:AVAudioSessionCategoryPlayback
withOptions:AVAudioSessionCategoryOptionMixWithOthers
error:NULL];
[AppInitializer onAppDidFinishLaunching];

return YES;
Expand Down

0 comments on commit 3964dba

Please sign in to comment.