Ver código fonte

Merge pull request #827 from jitsi/fix-missing-indications-on-no-video-device

Moves local video thumb initializations where they belong.
master
yanas 9 anos atrás
pai
commit
224670ed03

+ 5
- 0
modules/UI/videolayout/LocalVideo.js Ver arquivo

@@ -24,6 +24,11 @@ function LocalVideo(VideoLayout, emitter) {
24 24
     this.initBrowserSpecificProperties();
25 25
 
26 26
     SmallVideo.call(this, VideoLayout);
27
+
28
+    // Set default display name.
29
+    this.setDisplayName();
30
+
31
+    this.createConnectionIndicator();
27 32
 }
28 33
 
29 34
 LocalVideo.prototype = Object.create(SmallVideo.prototype);

+ 3
- 8
modules/UI/videolayout/VideoLayout.js Ver arquivo

@@ -107,7 +107,9 @@ var VideoLayout = {
107 107
         localVideoThumbnail.setVideoType(VIDEO_CONTAINER_TYPE);
108 108
         // if we do not resize the thumbs here, if there is no video device
109 109
         // the local video thumb maybe one pixel
110
-        this.resizeThumbnails(false, true, false);
110
+        let {thumbWidth, thumbHeight}
111
+            = this.resizeThumbnails(false, true, false);
112
+        AudioLevels.updateAudioLevelCanvas(null, thumbWidth, thumbHeight);
111 113
 
112 114
         emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
113 115
         this.lastNCount = config.channelLastN;
@@ -158,16 +160,9 @@ var VideoLayout = {
158 160
     },
159 161
 
160 162
     changeLocalVideo (stream) {
161
-        // Set default display name.
162
-        localVideoThumbnail.setDisplayName();
163
-        localVideoThumbnail.createConnectionIndicator();
164
-
165 163
         let localId = APP.conference.getMyUserId();
166 164
         this.onVideoTypeChanged(localId, stream.videoType);
167 165
 
168
-        let {thumbWidth, thumbHeight} = this.resizeThumbnails(false, true);
169
-        AudioLevels.updateAudioLevelCanvas(null, thumbWidth, thumbHeight);
170
-
171 166
         if (!stream.isMuted()) {
172 167
             localVideoThumbnail.changeVideo(stream);
173 168
         }

Carregando…
Cancelar
Salvar