Преглед изворни кода

ref(SmallVideo): rename 'isMuted' to avoid confusion

j8
paweldomas пре 8 година
родитељ
комит
2c01fde713
2 измењених фајлова са 9 додато и 10 уклоњено
  1. 4
    5
      modules/UI/videolayout/RemoteVideo.js
  2. 5
    5
      modules/UI/videolayout/SmallVideo.js

+ 4
- 5
modules/UI/videolayout/RemoteVideo.js Прегледај датотеку

@@ -19,7 +19,6 @@ function RemoteVideo(id, VideoLayout, emitter) {
19 19
     this.setDisplayName();
20 20
     this.flipX = false;
21 21
     this.isLocal = false;
22
-    this.isMuted = false;
23 22
 }
24 23
 
25 24
 RemoteVideo.prototype = Object.create(SmallVideo.prototype);
@@ -61,7 +60,7 @@ RemoteVideo.prototype._initPopupMenu = function (popupMenuElement) {
61 60
     this.popover.show = function () {
62 61
         // update content by forcing it, to finish even if popover
63 62
         // is not visible
64
-        this.updateRemoteVideoMenu(this.isMuted, true);
63
+        this.updateRemoteVideoMenu(this.isAudioMuted, true);
65 64
         // call the original show, passing its actual this
66 65
         origShowFunc.call(this.popover);
67 66
     }.bind(this);
@@ -97,7 +96,7 @@ RemoteVideo.prototype._generatePopupContent = function () {
97 96
 
98 97
     muteLinkItem.id = "mutelink_" + this.id;
99 98
 
100
-    if (this.isMuted) {
99
+    if (this.isAudioMuted) {
101 100
         muteLinkItem.innerHTML = mutedHTML;
102 101
         muteLinkItem.className = 'mutelink disabled';
103 102
     }
@@ -109,7 +108,7 @@ RemoteVideo.prototype._generatePopupContent = function () {
109 108
     // Delegate event to the document.
110 109
     $(document).on("click", "#mutelink_" + this.id, function(){
111 110
 
112
-        if (this.isMuted)
111
+        if (this.isAudioMuted)
113 112
             return;
114 113
 
115 114
         this.emitter.emit(UIEvents.REMOTE_AUDIO_MUTED, this.id);
@@ -153,7 +152,7 @@ RemoteVideo.prototype._generatePopupContent = function () {
153 152
  */
154 153
 RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted, force) {
155 154
 
156
-    this.isMuted = isMuted;
155
+    this.isAudioMuted = isMuted;
157 156
 
158 157
     // generate content, translate it and add it to document only if
159 158
     // popover is visible or we force to do so.

+ 5
- 5
modules/UI/videolayout/SmallVideo.js Прегледај датотеку

@@ -7,7 +7,7 @@ import UIEvents from "../../../service/UI/UIEvents";
7 7
 const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
8 8
 
9 9
 function SmallVideo(VideoLayout) {
10
-    this.isMuted = false;
10
+    this.isAudioMuted = false;
11 11
     this.hasAvatar = false;
12 12
     this.isVideoMuted = false;
13 13
     this.videoStream = null;
@@ -204,7 +204,7 @@ SmallVideo.prototype.showAudioIndicator = function(isMuted) {
204 204
     else {
205 205
         audioMutedIndicator.show();
206 206
     }
207
-    this.isMuted = isMuted;
207
+    this.isAudioMuted = isMuted;
208 208
 };
209 209
 
210 210
 /**
@@ -222,7 +222,7 @@ SmallVideo.prototype.getAudioMutedIndicator = function () {
222 222
 
223 223
     audioMutedSpan = document.createElement('span');
224 224
     audioMutedSpan.className = 'audioMuted toolbar-icon';
225
-    
225
+
226 226
     UIUtil.setTooltip(audioMutedSpan,
227 227
         "videothumbnail.mute",
228 228
         "top");
@@ -277,11 +277,11 @@ SmallVideo.prototype.getVideoMutedIndicator = function () {
277 277
 
278 278
     var mutedIndicator = document.createElement('i');
279 279
     mutedIndicator.className = 'icon-camera-disabled';
280
-    
280
+
281 281
     UIUtil.setTooltip(mutedIndicator,
282 282
         "videothumbnail.videomute",
283 283
         "top");
284
-    
284
+
285 285
     videoMutedSpan.appendChild(mutedIndicator);
286 286
 
287 287
     return $('#' + this.videoSpanId + ' .videoMuted');

Loading…
Откажи
Сачувај