mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-09 22:04:24 +01:00
Merge pull request #3670 from nextcloud/bugfix/2704/janus1x
add compatibility for janus 1.x
This commit is contained in:
commit
535d8c7ed4
@ -398,8 +398,7 @@ public class PeerConnectionWrapper {
|
||||
@Override
|
||||
public void onStateChange() {
|
||||
if (dataChannel != null &&
|
||||
dataChannel.state() == DataChannel.State.OPEN &&
|
||||
"status".equals(dataChannel.label())) {
|
||||
dataChannel.state() == DataChannel.State.OPEN) {
|
||||
sendInitialMediaStatus();
|
||||
}
|
||||
}
|
||||
@ -535,10 +534,12 @@ public class PeerConnectionWrapper {
|
||||
|
||||
@Override
|
||||
public void onDataChannel(DataChannel dataChannel) {
|
||||
if ("status".equals(dataChannel.label()) || "JanusDataChannel".equals(dataChannel.label())) {
|
||||
PeerConnectionWrapper.this.dataChannel = dataChannel;
|
||||
PeerConnectionWrapper.this.dataChannel.registerObserver(new MagicDataChannelObserver());
|
||||
if (PeerConnectionWrapper.this.dataChannel != null) {
|
||||
Log.w(TAG, "Data channel with label " + PeerConnectionWrapper.this.dataChannel.label()
|
||||
+ " exists, but received onDataChannel event for DataChannel with label " + dataChannel.label());
|
||||
}
|
||||
PeerConnectionWrapper.this.dataChannel = dataChannel;
|
||||
PeerConnectionWrapper.this.dataChannel.registerObserver(new MagicDataChannelObserver());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user