Parcourir la source

Shows dominant speaker icon for the local user, when he is the dominant speaker.

master
damencho il y a 9 ans
Parent
révision
e81d3c02ad

+ 0
- 35
modules/UI/videolayout/RemoteVideo.js Voir le fichier

@@ -342,41 +342,6 @@ RemoteVideo.prototype.updateRemoteVideoMenu = function (isMuted) {
342 342
     }
343 343
 };
344 344
 
345
-/**
346
- * Updates the Indicator for dominant speaker.
347
- *
348
- * @param isSpeaker indicates the current indicator state
349
- */
350
-RemoteVideo.prototype.updateDominantSpeakerIndicator = function (isSpeaker) {
351
-
352
-    if (!this.container) {
353
-        console.warn( "Unable to set dominant speaker indicator - "
354
-            + this.videoSpanId + " does not exist");
355
-        return;
356
-    }
357
-
358
-    var indicatorSpan
359
-        = $('#' + this.videoSpanId + '>span.dominantspeakerindicator');
360
-
361
-    // If we do not have an indicator for this video.
362
-    if (indicatorSpan.length <= 0) {
363
-        indicatorSpan = document.createElement('span');
364
-
365
-        indicatorSpan.innerHTML
366
-            = "<i id='speakerindicatoricon' class='fa fa-bullhorn'></i>";
367
-        indicatorSpan.className = 'dominantspeakerindicator';
368
-
369
-        $('#' + this.videoSpanId)[0].appendChild(indicatorSpan);
370
-
371
-        // adds a tooltip
372
-        UIUtils.setTooltip(indicatorSpan, "speaker", "left");
373
-        APP.translation.translateElement($(indicatorSpan));
374
-    }
375
-
376
-    $(indicatorSpan).css("visibility", isSpeaker ? "visible" : "hidden");
377
-};
378
-
379
-
380 345
 /**
381 346
  * Sets the display name for the given video span id.
382 347
  */

+ 34
- 0
modules/UI/videolayout/SmallVideo.js Voir le fichier

@@ -382,4 +382,38 @@ SmallVideo.prototype.avatarChanged = function (avatarUrl) {
382 382
     }
383 383
 };
384 384
 
385
+/**
386
+ * Updates the Indicator for dominant speaker.
387
+ *
388
+ * @param isSpeaker indicates the current indicator state
389
+ */
390
+SmallVideo.prototype.updateDominantSpeakerIndicator = function (isSpeaker) {
391
+
392
+    if (!this.container) {
393
+        console.warn( "Unable to set dominant speaker indicator - "
394
+            + this.videoSpanId + " does not exist");
395
+        return;
396
+    }
397
+
398
+    var indicatorSpan
399
+        = $('#' + this.videoSpanId + '>span.dominantspeakerindicator');
400
+
401
+    // If we do not have an indicator for this video.
402
+    if (indicatorSpan.length <= 0) {
403
+        indicatorSpan = document.createElement('span');
404
+
405
+        indicatorSpan.innerHTML
406
+            = "<i id='speakerindicatoricon' class='fa fa-bullhorn'></i>";
407
+        indicatorSpan.className = 'dominantspeakerindicator';
408
+
409
+        $('#' + this.videoSpanId)[0].appendChild(indicatorSpan);
410
+
411
+        // adds a tooltip
412
+        UIUtil.setTooltip(indicatorSpan, "speaker", "left");
413
+        APP.translation.translateElement($(indicatorSpan));
414
+    }
415
+
416
+    $(indicatorSpan).css("visibility", isSpeaker ? "visible" : "hidden");
417
+};
418
+
385 419
 export default SmallVideo;

+ 2
- 0
modules/UI/videolayout/VideoLayout.js Voir le fichier

@@ -538,6 +538,7 @@ var VideoLayout = {
538 538
             if(oldSpeakerRemoteVideo)
539 539
             {
540 540
                 oldSpeakerRemoteVideo.updateDominantSpeakerIndicator(false);
541
+                localVideoThumbnail.updateDominantSpeakerIndicator(true);
541 542
                 currentDominantSpeaker = null;
542 543
             }
543 544
             return;
@@ -550,6 +551,7 @@ var VideoLayout = {
550 551
 
551 552
         // Update the current dominant speaker.
552 553
         remoteVideo.updateDominantSpeakerIndicator(true);
554
+        localVideoThumbnail.updateDominantSpeakerIndicator(false);
553 555
 
554 556
         // let's remove the indications from the remote video if any
555 557
         if (oldSpeakerRemoteVideo) {

Chargement…
Annuler
Enregistrer