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