feat(tile-view): exit tile view on pin (#3430)
* feat(tile-view): exit tile view on pin * Try out this other ux impl
This commit is contained in:
parent
72922130a2
commit
e63cd8c81b
|
@ -1,5 +1,4 @@
|
||||||
/* global $, APP */
|
/* global $ */
|
||||||
import { shouldDisplayTileView } from '../../../react/features/video-layout';
|
|
||||||
|
|
||||||
import SmallVideo from '../videolayout/SmallVideo';
|
import SmallVideo from '../videolayout/SmallVideo';
|
||||||
|
|
||||||
|
@ -66,9 +65,7 @@ SharedVideoThumb.prototype.createContainer = function(spanId) {
|
||||||
* The thumb click handler.
|
* The thumb click handler.
|
||||||
*/
|
*/
|
||||||
SharedVideoThumb.prototype.videoClick = function() {
|
SharedVideoThumb.prototype.videoClick = function() {
|
||||||
if (!shouldDisplayTileView(APP.store.getState())) {
|
this._togglePin();
|
||||||
this._togglePin();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -275,9 +275,7 @@ LocalVideo.prototype._onContainerClick = function(event) {
|
||||||
= $source.parents('.displayNameContainer').length > 0;
|
= $source.parents('.displayNameContainer').length > 0;
|
||||||
const clickedOnPopover = $source.parents('.popover').length > 0
|
const clickedOnPopover = $source.parents('.popover').length > 0
|
||||||
|| classList.contains('popover');
|
|| classList.contains('popover');
|
||||||
const ignoreClick = clickedOnDisplayName
|
const ignoreClick = clickedOnDisplayName || clickedOnPopover;
|
||||||
|| clickedOnPopover
|
|
||||||
|| shouldDisplayTileView(APP.store.getState());
|
|
||||||
|
|
||||||
if (event.stopPropagation && !ignoreClick) {
|
if (event.stopPropagation && !ignoreClick) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
|
@ -627,8 +627,7 @@ RemoteVideo.prototype._onContainerClick = function(event) {
|
||||||
const { classList } = event.target;
|
const { classList } = event.target;
|
||||||
|
|
||||||
const ignoreClick = $source.parents('.popover').length > 0
|
const ignoreClick = $source.parents('.popover').length > 0
|
||||||
|| classList.contains('popover')
|
|| classList.contains('popover');
|
||||||
|| shouldDisplayTileView(APP.store.getState());
|
|
||||||
|
|
||||||
if (!ignoreClick) {
|
if (!ignoreClick) {
|
||||||
this._togglePin();
|
this._togglePin();
|
||||||
|
|
|
@ -30,6 +30,7 @@ import {
|
||||||
import {
|
import {
|
||||||
LAYOUTS,
|
LAYOUTS,
|
||||||
getCurrentLayout,
|
getCurrentLayout,
|
||||||
|
setTileView,
|
||||||
shouldDisplayTileView
|
shouldDisplayTileView
|
||||||
} from '../../../react/features/video-layout';
|
} from '../../../react/features/video-layout';
|
||||||
/* eslint-enable no-unused-vars */
|
/* eslint-enable no-unused-vars */
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import { LAYOUTS } from './constants';
|
import { LAYOUTS } from './constants';
|
||||||
|
import { getPinnedParticipant } from '../base/participants';
|
||||||
|
|
||||||
declare var interfaceConfig: Object;
|
declare var interfaceConfig: Object;
|
||||||
|
|
||||||
|
@ -80,5 +81,6 @@ export function shouldDisplayTileView(state: Object = {}) {
|
||||||
// should never be enabled for filmstrip only mode.
|
// should never be enabled for filmstrip only mode.
|
||||||
&& (typeof interfaceConfig === 'undefined'
|
&& (typeof interfaceConfig === 'undefined'
|
||||||
|| !interfaceConfig.filmStripOnly)
|
|| !interfaceConfig.filmStripOnly)
|
||||||
|
&& !getPinnedParticipant(state)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue