Browse Source

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

Sending unpin after clicking local video and unpinning remote.
j8
hristoterezov 8 years ago
parent
commit
f32438b219
1 changed files with 9 additions and 3 deletions
  1. 9
    3
      modules/UI/videolayout/VideoLayout.js

+ 9
- 3
modules/UI/videolayout/VideoLayout.js View File

341
      * @param id the identifier of the video thumbnail
341
      * @param id the identifier of the video thumbnail
342
      */
342
      */
343
     handleVideoThumbClicked (id) {
343
     handleVideoThumbClicked (id) {
344
+        var smallVideo = VideoLayout.getSmallVideo(id);
344
         if(pinnedId) {
345
         if(pinnedId) {
345
             var oldSmallVideo = VideoLayout.getSmallVideo(pinnedId);
346
             var oldSmallVideo = VideoLayout.getSmallVideo(pinnedId);
346
-            if (oldSmallVideo && !interfaceConfig.filmStripOnly)
347
+            if (oldSmallVideo && !interfaceConfig.filmStripOnly) {
347
                 oldSmallVideo.focus(false);
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
         // Unpin if currently pinned.
358
         // Unpin if currently pinned.
353
         if (pinnedId === id)
359
         if (pinnedId === id)
354
         {
360
         {

Loading…
Cancel
Save