mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
add compatibility for janus 1.x
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
abe9a9d5fb
commit
fcf6c845a7
1 changed files with 6 additions and 5 deletions
|
@ -398,8 +398,7 @@ public class PeerConnectionWrapper {
|
||||||
@Override
|
@Override
|
||||||
public void onStateChange() {
|
public void onStateChange() {
|
||||||
if (dataChannel != null &&
|
if (dataChannel != null &&
|
||||||
dataChannel.state() == DataChannel.State.OPEN &&
|
dataChannel.state() == DataChannel.State.OPEN) {
|
||||||
"status".equals(dataChannel.label())) {
|
|
||||||
sendInitialMediaStatus();
|
sendInitialMediaStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -535,10 +534,12 @@ public class PeerConnectionWrapper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDataChannel(DataChannel dataChannel) {
|
public void onDataChannel(DataChannel dataChannel) {
|
||||||
if ("status".equals(dataChannel.label()) || "JanusDataChannel".equals(dataChannel.label())) {
|
if (PeerConnectionWrapper.this.dataChannel != null) {
|
||||||
PeerConnectionWrapper.this.dataChannel = dataChannel;
|
Log.w(TAG, "Data channel with label " + PeerConnectionWrapper.this.dataChannel.label()
|
||||||
PeerConnectionWrapper.this.dataChannel.registerObserver(new MagicDataChannelObserver());
|
+ " exists, but received onDataChannel event for DataChannel with label " + dataChannel.label());
|
||||||
}
|
}
|
||||||
|
PeerConnectionWrapper.this.dataChannel = dataChannel;
|
||||||
|
PeerConnectionWrapper.this.dataChannel.registerObserver(new MagicDataChannelObserver());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue