mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Using PLAN_B for now to make it work with the old code
This commit is contained in:
parent
84896f8d23
commit
c3d928ed8c
@ -64,6 +64,7 @@ class PeerConnectionWrapper(private val context: Context,
|
||||
val configuration = PeerConnection.RTCConfiguration(iceServers).apply {
|
||||
bundlePolicy = PeerConnection.BundlePolicy.MAXBUNDLE
|
||||
rtcpMuxPolicy = PeerConnection.RtcpMuxPolicy.REQUIRE
|
||||
sdpSemantics = PeerConnection.SdpSemantics.PLAN_B
|
||||
if (relay) {
|
||||
iceTransportsType = PeerConnection.IceTransportsType.RELAY
|
||||
}
|
||||
@ -74,10 +75,7 @@ class PeerConnectionWrapper(private val context: Context,
|
||||
newPeerConnection.setAudioPlayout(true)
|
||||
newPeerConnection.setAudioRecording(true)
|
||||
|
||||
// Calls to `addStream` are deprecated & cause errors so we must use `addTracks` when
|
||||
// using `io.github.webrtc-sdk:android:114.5735.10` and newer.
|
||||
newPeerConnection.addTrack(mediaStream.audioTracks[0])
|
||||
if (mediaStream.videoTracks.isNotEmpty()) newPeerConnection.addTrack(mediaStream.videoTracks[0])
|
||||
newPeerConnection.addStream(mediaStream)
|
||||
}
|
||||
|
||||
init {
|
||||
|
Loading…
x
Reference in New Issue
Block a user