|
@@ -1937,8 +1937,6 @@ UI.getRoomName = function () {
|
1937
|
1937
|
* Mutes/unmutes the local video.
|
1938
|
1938
|
*/
|
1939
|
1939
|
UI.toggleVideo = function () {
|
1940
|
|
- UIUtil.buttonClick("#video", "icon-camera icon-camera-disabled");
|
1941
|
|
-
|
1942
|
1940
|
setVideoMute(!APP.RTC.localVideo.isMuted());
|
1943
|
1941
|
};
|
1944
|
1942
|
|
|
@@ -8295,7 +8293,7 @@ var VideoLayout = (function (my) {
|
8295
|
8293
|
*/
|
8296
|
8294
|
$(document).bind('videomuted.muc', function (event, jid, value) {
|
8297
|
8295
|
var isMuted = (value === "true");
|
8298
|
|
- if(!APP.RTC.muteRemoteVideoStream(jid, isMuted))
|
|
8296
|
+ if(jid !== APP.xmpp.myJid() && !APP.RTC.muteRemoteVideoStream(jid, isMuted))
|
8299
|
8297
|
return;
|
8300
|
8298
|
|
8301
|
8299
|
Avatar.showUserAvatar(jid, isMuted);
|
|
@@ -13177,30 +13175,9 @@ JingleSession.prototype.setVideoMute = function (mute, callback, options) {
|
13177
|
13175
|
return;
|
13178
|
13176
|
}
|
13179
|
13177
|
|
13180
|
|
- var self = this;
|
13181
|
|
- var localCallback = function (mute) {
|
13182
|
|
- self.connection.emuc.addVideoInfoToPresence(mute);
|
13183
|
|
- self.connection.emuc.sendPresence();
|
13184
|
|
- return callback(mute)
|
13185
|
|
- };
|
13186
|
|
-
|
13187
|
|
- if (mute == APP.RTC.localVideo.isMuted())
|
13188
|
|
- {
|
13189
|
|
- // Even if no change occurs, the specified callback is to be executed.
|
13190
|
|
- // The specified callback may, optionally, return a successCallback
|
13191
|
|
- // which is to be executed as well.
|
13192
|
|
- var successCallback = localCallback(mute);
|
13193
|
|
-
|
13194
|
|
- if (successCallback) {
|
13195
|
|
- successCallback();
|
13196
|
|
- }
|
13197
|
|
- } else {
|
13198
|
|
- APP.RTC.localVideo.setMute(!mute);
|
13199
|
|
-
|
13200
|
|
- this.hardMuteVideo(mute);
|
|
13178
|
+ this.hardMuteVideo(mute);
|
13201
|
13179
|
|
13202
|
|
- this.modifySources(localCallback(mute));
|
13203
|
|
- }
|
|
13180
|
+ this.modifySources(callback(mute));
|
13204
|
13181
|
};
|
13205
|
13182
|
|
13206
|
13183
|
// SDP-based mute by going recvonly/sendrecv
|
|
@@ -16933,10 +16910,37 @@ var XMPP = {
|
16933
|
16910
|
}
|
16934
|
16911
|
},
|
16935
|
16912
|
setVideoMute: function (mute, callback, options) {
|
16936
|
|
- if(connection && APP.RTC.localVideo && connection.jingle.activecall)
|
16937
|
|
- {
|
16938
|
|
- connection.jingle.activecall.setVideoMute(mute, callback, options);
|
16939
|
|
- }
|
|
16913
|
+ if(!connection || !APP.RTC.localVideo)
|
|
16914
|
+ return;
|
|
16915
|
+
|
|
16916
|
+ var localCallback = function (mute) {
|
|
16917
|
+ connection.emuc.addVideoInfoToPresence(mute);
|
|
16918
|
+ connection.emuc.sendPresence();
|
|
16919
|
+ return callback(mute);
|
|
16920
|
+ };
|
|
16921
|
+
|
|
16922
|
+ if (mute == APP.RTC.localVideo.isMuted())
|
|
16923
|
+ {
|
|
16924
|
+ // Even if no change occurs, the specified callback is to be executed.
|
|
16925
|
+ // The specified callback may, optionally, return a successCallback
|
|
16926
|
+ // which is to be executed as well.
|
|
16927
|
+ var successCallback = localCallback(mute);
|
|
16928
|
+
|
|
16929
|
+ if (successCallback) {
|
|
16930
|
+ successCallback();
|
|
16931
|
+ }
|
|
16932
|
+ } else {
|
|
16933
|
+ APP.RTC.localVideo.setMute(!mute);
|
|
16934
|
+ if(connection.jingle.activecall)
|
|
16935
|
+ {
|
|
16936
|
+ connection.jingle.activecall.setVideoMute(
|
|
16937
|
+ mute, localCallback, options);
|
|
16938
|
+ }
|
|
16939
|
+ else {
|
|
16940
|
+ localCallback(mute);
|
|
16941
|
+ }
|
|
16942
|
+
|
|
16943
|
+ }
|
16940
|
16944
|
},
|
16941
|
16945
|
setAudioMute: function (mute, callback) {
|
16942
|
16946
|
if (!(connection && APP.RTC.localAudio)) {
|