浏览代码

feat(tile-view): exit tile view on pin (#3430)

* feat(tile-view): exit tile view on pin

* Try out this other ux impl
master
virtuacoplenny 7 年前
父节点
当前提交
e63cd8c81b

+ 2
- 5
modules/UI/shared_video/SharedVideoThumb.js 查看文件

@@ -1,5 +1,4 @@
1
-/* global $, APP */
2
-import { shouldDisplayTileView } from '../../../react/features/video-layout';
1
+/* global $ */
3 2
 
4 3
 import SmallVideo from '../videolayout/SmallVideo';
5 4
 
@@ -66,9 +65,7 @@ SharedVideoThumb.prototype.createContainer = function(spanId) {
66 65
  * The thumb click handler.
67 66
  */
68 67
 SharedVideoThumb.prototype.videoClick = function() {
69
-    if (!shouldDisplayTileView(APP.store.getState())) {
70
-        this._togglePin();
71
-    }
68
+    this._togglePin();
72 69
 };
73 70
 
74 71
 /**

+ 1
- 3
modules/UI/videolayout/LocalVideo.js 查看文件

@@ -275,9 +275,7 @@ LocalVideo.prototype._onContainerClick = function(event) {
275 275
         = $source.parents('.displayNameContainer').length > 0;
276 276
     const clickedOnPopover = $source.parents('.popover').length > 0
277 277
             || classList.contains('popover');
278
-    const ignoreClick = clickedOnDisplayName
279
-        || clickedOnPopover
280
-        || shouldDisplayTileView(APP.store.getState());
278
+    const ignoreClick = clickedOnDisplayName || clickedOnPopover;
281 279
 
282 280
     if (event.stopPropagation && !ignoreClick) {
283 281
         event.stopPropagation();

+ 1
- 2
modules/UI/videolayout/RemoteVideo.js 查看文件

@@ -627,8 +627,7 @@ RemoteVideo.prototype._onContainerClick = function(event) {
627 627
     const { classList } = event.target;
628 628
 
629 629
     const ignoreClick = $source.parents('.popover').length > 0
630
-            || classList.contains('popover')
631
-            || shouldDisplayTileView(APP.store.getState());
630
+            || classList.contains('popover');
632 631
 
633 632
     if (!ignoreClick) {
634 633
         this._togglePin();

+ 1
- 0
modules/UI/videolayout/SmallVideo.js 查看文件

@@ -30,6 +30,7 @@ import {
30 30
 import {
31 31
     LAYOUTS,
32 32
     getCurrentLayout,
33
+    setTileView,
33 34
     shouldDisplayTileView
34 35
 } from '../../../react/features/video-layout';
35 36
 /* eslint-enable no-unused-vars */

+ 2
- 0
react/features/video-layout/functions.js 查看文件

@@ -1,6 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import { LAYOUTS } from './constants';
4
+import { getPinnedParticipant } from '../base/participants';
4 5
 
5 6
 declare var interfaceConfig: Object;
6 7
 
@@ -80,5 +81,6 @@ export function shouldDisplayTileView(state: Object = {}) {
80 81
             // should never be enabled for filmstrip only mode.
81 82
             && (typeof interfaceConfig === 'undefined'
82 83
                 || !interfaceConfig.filmStripOnly)
84
+            && !getPinnedParticipant(state)
83 85
     );
84 86
 }

正在加载...
取消
保存