|
@@ -1325,6 +1325,9 @@ var RTC = {
|
1325
|
1325
|
this.localVideo = this.createLocalStream(videoStream, "video", true, type);
|
1326
|
1326
|
// Stop the stream to trigger onended event for old stream
|
1327
|
1327
|
oldStream.stop();
|
|
1328
|
+
|
|
1329
|
+ this.switchVideoStreams(videoStream, oldStream);
|
|
1330
|
+
|
1328
|
1331
|
APP.xmpp.switchStreams(videoStream, oldStream,localCallback);
|
1329
|
1332
|
},
|
1330
|
1333
|
changeLocalAudio: function (stream, callback) {
|
|
@@ -8591,7 +8594,10 @@ var VideoLayout = (function (my) {
|
8591
|
8594
|
|
8592
|
8595
|
localVideoThumbnail.changeVideo(stream, isMuted);
|
8593
|
8596
|
|
8594
|
|
- LargeVideo.updateLargeVideo(APP.xmpp.myResource());
|
|
8597
|
+ LargeVideo.updateLargeVideo(
|
|
8598
|
+ APP.xmpp.myResource(),
|
|
8599
|
+ /* force update only before conference starts */
|
|
8600
|
+ !APP.xmpp.isConferenceInProgress());
|
8595
|
8601
|
|
8596
|
8602
|
};
|
8597
|
8603
|
|
|
@@ -12768,9 +12774,6 @@ JingleSession.prototype.switchStreams = function (new_stream, oldStream, success
|
12768
|
12774
|
self.peerconnection.addStream(new_stream);
|
12769
|
12775
|
}
|
12770
|
12776
|
|
12771
|
|
- if(!isAudio)
|
12772
|
|
- APP.RTC.switchVideoStreams(new_stream, oldStream);
|
12773
|
|
-
|
12774
|
12777
|
// Conference is not active
|
12775
|
12778
|
if(!oldSdp || !self.peerconnection) {
|
12776
|
12779
|
success_callback();
|
|
@@ -16846,8 +16849,12 @@ var XMPP = {
|
16846
|
16849
|
isExternalAuthEnabled: function () {
|
16847
|
16850
|
return Moderator.isExternalAuthEnabled();
|
16848
|
16851
|
},
|
|
16852
|
+ isConferenceInProgress: function () {
|
|
16853
|
+ return connection && connection.jingle.activecall &&
|
|
16854
|
+ connection.jingle.activecall.peerconnection;
|
|
16855
|
+ },
|
16849
|
16856
|
switchStreams: function (stream, oldStream, callback, isAudio) {
|
16850
|
|
- if (connection && connection.jingle.activecall) {
|
|
16857
|
+ if (this.isConferenceInProgress()) {
|
16851
|
16858
|
// FIXME: will block switchInProgress on true value in case of exception
|
16852
|
16859
|
connection.jingle.activecall.switchStreams(stream, oldStream, callback, isAudio);
|
16853
|
16860
|
} else {
|
|
@@ -17085,8 +17092,7 @@ var XMPP = {
|
17085
|
17092
|
return connection.jingle.sessions;
|
17086
|
17093
|
},
|
17087
|
17094
|
removeStream: function (stream) {
|
17088
|
|
- if(!connection || !connection.jingle.activecall ||
|
17089
|
|
- !connection.jingle.activecall.peerconnection)
|
|
17095
|
+ if (!this.isConferenceInProgress())
|
17090
|
17096
|
return;
|
17091
|
17097
|
connection.jingle.activecall.peerconnection.removeStream(stream);
|
17092
|
17098
|
}
|