소스 검색

Merge pull request #89594 from LeonardoDemartino/ios_airpods_routing

iOS: Fix AirPods routing when Play and Record category is used.
Rémi Verschelde 1 년 전
부모
커밋
a277361321
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      platform/ios/app_delegate.mm

+ 2 - 0
platform/ios/app_delegate.mm

@@ -116,6 +116,8 @@ static ViewController *mainViewController = nil;
 	} else if (sessionCategorySetting == SESSION_CATEGORY_PLAY_AND_RECORD) {
 		category = AVAudioSessionCategoryPlayAndRecord;
 		options |= AVAudioSessionCategoryOptionDefaultToSpeaker;
+		options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP;
+		options |= AVAudioSessionCategoryOptionAllowAirPlay;
 	} else if (sessionCategorySetting == SESSION_CATEGORY_PLAYBACK) {
 		category = AVAudioSessionCategoryPlayback;
 	} else if (sessionCategorySetting == SESSION_CATEGORY_RECORD) {