mirror of
https://github.com/oxen-io/session-android.git
synced 2025-05-03 19:00: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 {
|
val configuration = PeerConnection.RTCConfiguration(iceServers).apply {
|
||||||
bundlePolicy = PeerConnection.BundlePolicy.MAXBUNDLE
|
bundlePolicy = PeerConnection.BundlePolicy.MAXBUNDLE
|
||||||
rtcpMuxPolicy = PeerConnection.RtcpMuxPolicy.REQUIRE
|
rtcpMuxPolicy = PeerConnection.RtcpMuxPolicy.REQUIRE
|
||||||
|
sdpSemantics = PeerConnection.SdpSemantics.PLAN_B
|
||||||
if (relay) {
|
if (relay) {
|
||||||
iceTransportsType = PeerConnection.IceTransportsType.RELAY
|
iceTransportsType = PeerConnection.IceTransportsType.RELAY
|
||||||
}
|
}
|
||||||
@ -74,10 +75,7 @@ class PeerConnectionWrapper(private val context: Context,
|
|||||||
newPeerConnection.setAudioPlayout(true)
|
newPeerConnection.setAudioPlayout(true)
|
||||||
newPeerConnection.setAudioRecording(true)
|
newPeerConnection.setAudioRecording(true)
|
||||||
|
|
||||||
// Calls to `addStream` are deprecated & cause errors so we must use `addTracks` when
|
newPeerConnection.addStream(mediaStream)
|
||||||
// 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])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user