Просмотр исходного кода

feat(SmallVideo): make thumbnail grey

The video or the avatar on a thumbnail will be displayed in greyscale
when the user is having connectivity issues.
j8
paweldomas 9 лет назад
Родитель
Сommit
30cb948dcf
2 измененных файлов: 13 добавлений и 0 удалений
  1. 5
    0
      css/_videolayout_default.scss
  2. 8
    0
      modules/UI/videolayout/RemoteVideo.js

+ 5
- 0
css/_videolayout_default.scss Просмотреть файл

@@ -455,6 +455,11 @@
455 455
     filter: blur(10px) grayscale(.5) opacity(0.8);
456 456
 }
457 457
 
458
+.videoThumbnailProblemFilter {
459
+    -webkit-filter: grayscale(100%);
460
+    filter: grayscale(100%);
461
+}
462
+
458 463
 #videoConnectionMessage {
459 464
     display: none;
460 465
     position: absolute;

+ 8
- 0
modules/UI/videolayout/RemoteVideo.js Просмотреть файл

@@ -268,6 +268,12 @@ RemoteVideo.prototype.updateConnectionStatusIndicator = function (isActive) {
268 268
 
269 269
     if(this.connectionIndicator)
270 270
         this.connectionIndicator.updateConnectionStatusIndicator(isActive);
271
+
272
+    // Toggle thumbnail video problem filter
273
+    this.selectVideoElement().toggleClass(
274
+        "videoThumbnailProblemFilter", !isActive);
275
+    this.$avatar().toggleClass(
276
+        "videoThumbnailProblemFilter", !isActive);
271 277
 };
272 278
 
273 279
 /**
@@ -300,6 +306,8 @@ RemoteVideo.prototype.waitForPlayback = function (streamElement, stream) {
300 306
     var onPlayingHandler = function () {
301 307
         self.VideoLayout.videoactive(streamElement, self.id);
302 308
         streamElement.onplaying = null;
309
+        // Refresh to show the video
310
+        self.updateView();
303 311
     };
304 312
     streamElement.onplaying = onPlayingHandler;
305 313
 };

Загрузка…
Отмена
Сохранить