소스 검색

Merge pull request #1161 from jitsi/pinning-local-not-signal-unpin

Sending unpin after clicking local video and unpinning remote.
j8
hristoterezov 8 년 전
부모
커밋
f32438b219
1개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 9
    3
      modules/UI/videolayout/VideoLayout.js

+ 9
- 3
modules/UI/videolayout/VideoLayout.js 파일 보기

@@ -341,14 +341,20 @@ var VideoLayout = {
341 341
      * @param id the identifier of the video thumbnail
342 342
      */
343 343
     handleVideoThumbClicked (id) {
344
+        var smallVideo = VideoLayout.getSmallVideo(id);
344 345
         if(pinnedId) {
345 346
             var oldSmallVideo = VideoLayout.getSmallVideo(pinnedId);
346
-            if (oldSmallVideo && !interfaceConfig.filmStripOnly)
347
+            if (oldSmallVideo && !interfaceConfig.filmStripOnly) {
347 348
                 oldSmallVideo.focus(false);
349
+                // as no pinned event will be sent for local video
350
+                // and we will unpin old one, lets signal it
351
+                // otherwise we will just send the new pinned one
352
+                if (smallVideo.isLocal)
353
+                    eventEmitter.emit(
354
+                        UIEvents.PINNED_ENDPOINT, oldSmallVideo, false);
355
+            }
348 356
         }
349 357
 
350
-        var smallVideo = VideoLayout.getSmallVideo(id);
351
-
352 358
         // Unpin if currently pinned.
353 359
         if (pinnedId === id)
354 360
         {

Loading…
취소
저장