refactor: playing around with deps and transport types

This commit is contained in:
Harris
2021-10-22 13:11:23 +11:00
parent b089da82c5
commit 0d62057de3
2 changed files with 6 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ dependencies {
implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.1'
implementation 'org.conscrypt:conscrypt-android:2.0.0'
implementation 'org.signal:aesgcmprovider:0.0.3'
implementation 'org.whispersystems:webrtc-android:M74'
implementation 'org.whispersystems:webrtc-android:M77'
implementation "me.leolin:ShortcutBadger:1.1.16"
implementation 'se.emilsjolander:stickylistheaders:2.7.0'
implementation 'com.jpardogo.materialtabstrip:library:1.0.9'

View File

@@ -96,13 +96,15 @@ class WebRtcTestsActivity: PassphraseRequiredActionBarActivity(), PeerConnection
private val peerConnection by lazy {
// TODO: in a lokinet world, ice servers shouldn't be needed as .loki addresses should suffice to p2p
val turn = PeerConnection.IceServer.builder("turn:freyr.getsession.org").setUsername("user").setPassword("password").createIceServer()
val stun = PeerConnection.IceServer.builder("stun:freyr.getsession.org").createIceServer()
val iceServers = mutableListOf(turn,stun)
val turn = PeerConnection.IceServer.builder("turn:freyr.getsession.org:5349").setUsername("webrtc").setPassword("webrtc").createIceServer()
// val stun = PeerConnection.IceServer.builder("stun:freyr.getsession.org").createIceServer()
val iceServers = mutableListOf(turn)
if (relayUsed) {
// add relay server
}
val rtcConfig = PeerConnection.RTCConfiguration(iceServers).apply {
this.tcpCandidatePolicy = PeerConnection.TcpCandidatePolicy.ENABLED
this.candidateNetworkPolicy = PeerConnection.CandidateNetworkPolicy.ALL
this.iceTransportsType = PeerConnection.IceTransportsType.RELAY
}
rtcConfig.keyType = PeerConnection.KeyType.ECDSA