version bump webrtc to m117

This commit is contained in:
Daniel Gultsch 2023-09-29 16:19:01 +02:00
parent 5371b100de
commit 05c79ff29d
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
3 changed files with 32 additions and 23 deletions

View file

@ -80,7 +80,7 @@ dependencies {
implementation 'com.google.guava:guava:31.1-android' implementation 'com.google.guava:guava:31.1-android'
quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.12.49' quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.12.49'
implementation 'im.conversations.webrtc:webrtc-android:104.0.0' implementation 'im.conversations.webrtc:webrtc-android:117.1.0'
} }
ext { ext {

View file

@ -2624,6 +2624,10 @@ public class JingleRtpConnection extends AbstractJingleConnection
if (port < 0 || port > 65535) { if (port < 0 || port > 65535) {
continue; continue;
} }
if (Arrays.asList("stun", "stuns", "turn", "turns") if (Arrays.asList("stun", "stuns", "turn", "turns")
.contains(type) .contains(type)
&& Arrays.asList("udp", "tcp").contains(transport)) { && Arrays.asList("udp", "tcp").contains(transport)) {
@ -2635,20 +2639,22 @@ public class JingleRtpConnection extends AbstractJingleConnection
+ ": skipping invalid combination of udp/tls in external services"); + ": skipping invalid combination of udp/tls in external services");
continue; continue;
} }
// TODO Starting on milestone 110, Chromium will perform
// stricter validation of TURN and STUN URLs passed to the // STUN URLs do not support a query section since M110
// constructor of an RTCPeerConnection. More specifically, final String uri;
// STUN URLs will not support a query section, and TURN URLs if (Arrays.asList("stun","stuns").contains(type)) {
// will support only a transport parameter in their query uri = String.format("%s:%s%s", type, IP.wrapIPv6(host),port);
// section. } else {
final PeerConnection.IceServer.Builder iceServerBuilder = uri = String.format(
PeerConnection.IceServer.builder(
String.format(
"%s:%s:%s?transport=%s", "%s:%s:%s?transport=%s",
type, type,
IP.wrapIPv6(host), IP.wrapIPv6(host),
port, port,
transport)); transport);
}
final PeerConnection.IceServer.Builder iceServerBuilder =
PeerConnection.IceServer.builder(uri);
iceServerBuilder.setTlsCertPolicy( iceServerBuilder.setTlsCertPolicy(
PeerConnection.TlsCertPolicy PeerConnection.TlsCertPolicy
.TLS_CERT_POLICY_INSECURE_NO_CHECK); .TLS_CERT_POLICY_INSECURE_NO_CHECK);

View file

@ -33,12 +33,12 @@ import org.webrtc.SdpObserver;
import org.webrtc.SessionDescription; import org.webrtc.SessionDescription;
import org.webrtc.VideoTrack; import org.webrtc.VideoTrack;
import org.webrtc.audio.JavaAudioDeviceModule; import org.webrtc.audio.JavaAudioDeviceModule;
import org.webrtc.voiceengine.WebRtcAudioEffects;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Queue; import java.util.Queue;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
@ -260,9 +260,7 @@ public class WebRTCWrapper {
Preconditions.checkNotNull(media); Preconditions.checkNotNull(media);
Preconditions.checkArgument( Preconditions.checkArgument(
media.size() > 0, "media can not be empty when initializing peer connection"); media.size() > 0, "media can not be empty when initializing peer connection");
final boolean setUseHardwareAcousticEchoCanceler = final boolean setUseHardwareAcousticEchoCanceler = !HARDWARE_AEC_BLACKLIST.contains(Build.MODEL);
WebRtcAudioEffects.canUseAcousticEchoCanceler()
&& !HARDWARE_AEC_BLACKLIST.contains(Build.MODEL);
Log.d( Log.d(
Config.LOGTAG, Config.LOGTAG,
String.format( String.format(
@ -574,11 +572,7 @@ public class WebRTCWrapper {
new SetSdpObserver() { new SetSdpObserver() {
@Override @Override
public void onSetSuccess() { public void onSetSuccess() {
final SessionDescription description = future.setFuture(getLocalDescriptionFuture());
peerConnection.getLocalDescription();
Log.d(EXTENDED_LOGGING_TAG, "set local description:");
logDescription(description);
future.set(description);
} }
@Override @Override
@ -592,6 +586,15 @@ public class WebRTCWrapper {
MoreExecutors.directExecutor()); MoreExecutors.directExecutor());
} }
private ListenableFuture<SessionDescription> getLocalDescriptionFuture() {
return Futures.submit(() -> {
final SessionDescription description = requirePeerConnection().getLocalDescription();
Log.d(EXTENDED_LOGGING_TAG, "local description:");
logDescription(description);
return description;
},executorService);
}
public static void logDescription(final SessionDescription sessionDescription) { public static void logDescription(final SessionDescription sessionDescription) {
for (final String line : for (final String line :
sessionDescription.description.split( sessionDescription.description.split(