Live video on the AT Protocol

Merge pull request #652 from streamplace/natb/stereo-mobile

feat: add stereo audio on ios + android builds

authored by natalie and committed by GitHub 8bcd74d1 a0637292

+8 -4
+8 -4
js/config-react-native-webrtc/src/config-react-native-webrtc.ts
··· 43 .build() 44 options.audioDeviceModule = JavaAudioDeviceModule.builder(this) 45 .setAudioAttributes(audioAttributes) 46 .createAudioDeviceModule() 47 `, 48 }, ··· 115 WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance]; 116 options.loggingSeverity = RTCLoggingSeverityWarning; 117 options.audioDevice = device; 118 ////END RTC PATCH//// 119 `, 120 }, ··· 124 to: () => ` 125 // WebRTC Configuration 126 let config = RTCAudioSessionConfiguration.webRTC() 127 - 128 let session = AVAudioSession.sharedInstance() 129 do { 130 - try session.setCategory(.playAndRecord, 131 options: [.defaultToSpeaker, .allowBluetooth]) 132 try session.setActive(true) 133 } catch { 134 print("Failed to configure audio session: \(error)") 135 } 136 - 137 let device = AUAudioUnitRTCAudioDevice() 138 139 let options = WebRTCModuleOptions.sharedInstance() 140 options.loggingSeverity = .warning 141 options.audioDevice = device 142 // End WebRTC Configuration 143 - 144 let delegate = ReactNativeDelegate() 145 `, 146 },
··· 43 .build() 44 options.audioDeviceModule = JavaAudioDeviceModule.builder(this) 45 .setAudioAttributes(audioAttributes) 46 + .setUseStereoInput(true) 47 + .setUseStereoOutput(true) 48 .createAudioDeviceModule() 49 `, 50 }, ··· 117 WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance]; 118 options.loggingSeverity = RTCLoggingSeverityWarning; 119 options.audioDevice = device; 120 + // Enable stereo audio 121 + options.enableStereoOutput = YES; 122 ////END RTC PATCH//// 123 `, 124 }, ··· 128 to: () => ` 129 // WebRTC Configuration 130 let config = RTCAudioSessionConfiguration.webRTC() 131 + 132 let session = AVAudioSession.sharedInstance() 133 do { 134 + try session.setCategory(.playAndRecord, 135 options: [.defaultToSpeaker, .allowBluetooth]) 136 try session.setActive(true) 137 } catch { 138 print("Failed to configure audio session: \(error)") 139 } 140 + 141 let device = AUAudioUnitRTCAudioDevice() 142 143 let options = WebRTCModuleOptions.sharedInstance() 144 options.loggingSeverity = .warning 145 options.audioDevice = device 146 // End WebRTC Configuration 147 + 148 let delegate = ReactNativeDelegate() 149 `, 150 },