Skip to content

Commit

Permalink
fix(watermark): conditionally exclude watermarks on prejoin and lobby
Browse files Browse the repository at this point in the history
view

Signed-off-by: Joshua Irmer <[email protected]>
  • Loading branch information
joshuai96 committed Oct 22, 2024
1 parent 24ae693 commit 2a3ebf5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
11 changes: 9 additions & 2 deletions react/features/large-video/components/LargeVideo.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { setTileView } from '../../video-layout/actions.web';
import Whiteboard from '../../whiteboard/components/web/Whiteboard';
import { isWhiteboardEnabled } from '../../whiteboard/functions';
import { setSeeWhatIsBeingShared } from '../actions.web';
import { getLargeVideoParticipant } from '../functions';
import { getLargeVideoParticipant, isWatermarksEnabled } from '../functions';

import ScreenSharePlaceholder from './ScreenSharePlaceholder.web';

Expand Down Expand Up @@ -109,6 +109,11 @@ interface IProps {
*/
_visibleFilmstrip: boolean;

/**
* Whether or not the watermarks are visible.
*/
_watermarksEnabled: boolean;

/**
* Whether or not the whiteboard is ready to be used.
*/
Expand Down Expand Up @@ -193,6 +198,7 @@ class LargeVideo extends Component<IProps> {
_isChatOpen,
_noAutoPlayVideo,
_showDominantSpeakerBadge,
_watermarksEnabled,
_whiteboardEnabled
} = this.props;
const style = this._getCustomStyles();
Expand All @@ -208,7 +214,7 @@ class LargeVideo extends Component<IProps> {
{_whiteboardEnabled && <Whiteboard />}
<div id = 'etherpad' />

<Watermarks />
{ _watermarksEnabled ? <Watermarks /> : <></> }

<div
id = 'dominantSpeaker'
Expand Down Expand Up @@ -378,6 +384,7 @@ function _mapStateToProps(state: IReduxState) {
_verticalFilmstripWidth: verticalFilmstripWidth.current,
_verticalViewMaxWidth: getVerticalViewMaxWidth(state),
_visibleFilmstrip: visible,
_watermarksEnabled: isWatermarksEnabled(state),
_whiteboardEnabled: isWhiteboardEnabled(state)
};
}
Expand Down
13 changes: 13 additions & 0 deletions react/features/large-video/functions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { IReduxState } from '../app/types';
import { getParticipantById } from '../base/participants/functions';
import { getIsLobbyVisible } from '../lobby/functions';
import { isPrejoinPageVisible } from '../prejoin/functions';


/**
* Selector for the participant currently displaying on the large video.
Expand All @@ -12,3 +15,13 @@ export function getLargeVideoParticipant(state: IReduxState) {

return getParticipantById(state, participantId ?? '');
}

/**
* Determines the necessity for watermarks.
*
* @param {IReduxState} state - The redux state.
* @returns {boolean}
*/
export function isWatermarksEnabled(state: IReduxState): boolean {
return !isPrejoinPageVisible(state) && !getIsLobbyVisible(state);
}

0 comments on commit 2a3ebf5

Please sign in to comment.