File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
packages/stream_video/lib/src Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,9 @@ class CallSession extends Disposable {
136136 ..onRemoteTrackReceived = _onRemoteTrackReceived
137137 ..onStatsReceived = _onStatsReceived;
138138
139+ if (CurrentPlatform .isIos) {
140+ await rtcManager? .setAppleAudioConfiguration ();
141+ }
139142 _logger.v (() => '[start] completed' );
140143 return const Result .success (none);
141144 } catch (e, stk) {
Original file line number Diff line number Diff line change @@ -816,6 +816,26 @@ extension RtcManagerTrackHelper on RtcManager {
816816 _logger.e (() => 'Unsupported trackType $trackType ' );
817817 return Result .error ('Unsupported trackType $trackType ' );
818818 }
819+
820+ Future <Result <None >> setAppleAudioConfiguration () async {
821+ try {
822+ await rtc.Helper .setAppleAudioConfiguration (
823+ rtc.AppleAudioConfiguration (
824+ appleAudioMode: rtc.AppleAudioMode .videoChat,
825+ appleAudioCategory: rtc.AppleAudioCategory .playAndRecord,
826+ appleAudioCategoryOptions: {
827+ rtc.AppleAudioCategoryOption .mixWithOthers,
828+ rtc.AppleAudioCategoryOption .allowBluetooth,
829+ rtc.AppleAudioCategoryOption .allowBluetoothA2DP,
830+ rtc.AppleAudioCategoryOption .allowAirPlay,
831+ },
832+ ),
833+ );
834+ return const Result .success (none);
835+ } catch (e, stk) {
836+ return Result .failure (VideoErrors .compose (e, stk));
837+ }
838+ }
819839}
820840
821841extension on RtcLocalTrack <VideoConstraints > {
You can’t perform that action at this time.
0 commit comments