mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 06:55:42 +03:00
Fix data channel suport with newer Janus versions
When Janus is used even if it is possible to open several data channels with different labels and send data on them all the messages are received in the first data channel opened. In Talk the "status" data channel is used to send the data channel messages, and before Janus 0.7.0 it was the first data channel opened, so the messages were received on it. However, since Janus 0.7.0 the data channel messages are received instead on a data channel opened by Janus, which is named "JanusDataChannel". It is not possible to change that behaviour on Janus except by patching it, so for broader compatibility the messages received in "JanusDataChannel" are treated like messages received in the "status" data channel Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
93c12a89de
commit
fcb45e94f3
1 changed files with 1 additions and 1 deletions
|
@ -406,7 +406,7 @@ public class MagicPeerConnectionWrapper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDataChannel(DataChannel dataChannel) {
|
public void onDataChannel(DataChannel dataChannel) {
|
||||||
if (dataChannel.label().equals("status")) {
|
if (dataChannel.label().equals("status") || dataChannel.label().equals("JanusDataChannel")) {
|
||||||
magicDataChannel = dataChannel;
|
magicDataChannel = dataChannel;
|
||||||
magicDataChannel.registerObserver(new MagicDataChannelObserver());
|
magicDataChannel.registerObserver(new MagicDataChannelObserver());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue