mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
FS-8202 #resolve [Stop peer when ending screen share]
This commit is contained in:
@@ -287,6 +287,13 @@
|
||||
onSuccess, onError);
|
||||
};
|
||||
|
||||
$.FSRTC.prototype.stopPeer = function() {
|
||||
if (self.peer) {
|
||||
console.log("stopping peer");
|
||||
self.peer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
$.FSRTC.prototype.stop = function() {
|
||||
var self = this;
|
||||
|
||||
|
@@ -1962,7 +1962,7 @@
|
||||
|
||||
dialog.rtc = new $.FSRTC({
|
||||
callbacks: RTCcallbacks,
|
||||
localVideo: dialog.localVideo,
|
||||
localVideo: dialog.screenShare ? null : dialog.localVideo,
|
||||
useVideo: dialog.params.useVideo ? dialog.videoStream : null,
|
||||
useAudio: dialog.audioStream,
|
||||
useStereo: dialog.params.useStereo,
|
||||
@@ -2093,7 +2093,9 @@
|
||||
break;
|
||||
case $.verto.enum.state.destroy:
|
||||
delete dialog.verto.dialogs[dialog.callID];
|
||||
if (!dialog.params.screenShare) {
|
||||
if (dialog.params.screenShare) {
|
||||
dialog.rtc.stopPeer();
|
||||
} else {
|
||||
dialog.rtc.stop();
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user