Merge pull request #2684 from nextcloud/do-not-create-offer-for-received-screen-share

Do not create offer for received screen share
This commit is contained in:
Marcel Hibbe 2023-01-18 19:15:10 +01:00 committed by GitHub
commit 8b0a58faeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}
}