mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 22:29:09 +00:00
Do not create offer for received screen share
When the HPB is not used and a PeerConnectionWrapper is created it always sent an offer if the local session ID is higher than the remote session ID. However, in the case of screen shares the participant sharing the screen always sends an offer, no matter the session ID. Therefore, when that offer was received the new PeerConnectionWrapper object sent a new offer, which in turn created an extra connection in the browser. Although the screen share connection happens to work the underlying behaviour was wrong, so now no offer is sent for received screen share connections and it is always waited until the offer is sent by the other participant. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
66f987cefb
commit
53c9c1cf8c
@ -181,7 +181,9 @@ public class PeerConnectionWrapper {
|
||||
// set the recipient session ID in the assembled call message.
|
||||
NCSignalingMessage ncSignalingMessage = createBaseSignalingMessage("requestoffer");
|
||||
signalingMessageSender.send(ncSignalingMessage);
|
||||
} else if (!hasMCU && hasInitiated) {
|
||||
} else if (!hasMCU && hasInitiated && "video".equals(this.videoStreamType)) {
|
||||
// If the connection type is "screen" the client sharing the screen will send an
|
||||
// offer; offers should be created only for videos.
|
||||
peerConnection.createOffer(magicSdpObserver, mediaConstraints);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user