+
{intl.formatMessage(intlMessages.findingWebcamsLabel)}
@@ -1030,10 +1043,7 @@ class VideoPreview extends Component {
)
}
-
- {this.renderDeviceSelectors()}
- {this.renderBrightnessInput()}
-
+ {this.renderTabsContent(selectedTab)}
);
}
@@ -1045,13 +1055,13 @@ class VideoPreview extends Component {
return intl.formatMessage(intlMessages.webcamSettingsTitle);
}
- renderModalContent() {
+ renderModalContent(selectedTab) {
const {
intl,
hasVideoStream,
forceOpen,
camCapReached,
- isVisualEffects,
+ closeModal,
} = this.props;
const {
@@ -1066,6 +1076,8 @@ class VideoPreview extends Component {
const shared = this.isAlreadyShared(webcamDeviceId);
+ const showStopAllButton = hasVideoStream && VideoService.isMultipleCamerasEnabled();
+
const { isIe } = browserInfo;
return (
@@ -1083,50 +1095,72 @@ class VideoPreview extends Component {
) : null}
- {this.renderContent()}
+ {this.renderContent(selectedTab)}
- {!isVisualEffects ? (
-
- {hasVideoStream && VideoService.isMultipleCamerasEnabled()
- ? (
+
+
+
+ {showStopAllButton ? (
-
- )
- : null
- }
-
- {!shared && camCapReached ? (
- {intl.formatMessage(intlMessages.camCapReached)}
- ) : ()}
-
-
- ) : null }
+ ) : null}
+ {!shared && camCapReached ? (
+ {intl.formatMessage(intlMessages.camCapReached)}
+ ) : (
+
+
+
+
+ )}
+
+
+
>
);
}
+ handleSelectTab(tab) {
+ this.setState({
+ selectedTab: tab,
+ });
+ }
+
render() {
const {
intl,
isCamLocked,
forceOpen,
- isVisualEffects,
isOpen,
priority,
+ cameraAsContent,
+ cameraAsContentDeviceId,
+ isVirtualBackgroundsEnabled,
} = this.props;
+ const { selectedTab, webcamDeviceId } = this.state;
+
+ const BASE_NAME = window.meetingClientSettings.public.app.basename;
+ const WebcamSettingsImg = `${BASE_NAME}/resources/images/webcam_settings.svg`;
+ const WebcamBackgroundImg = `${BASE_NAME}/resources/images/webcam_background.svg`;
+
+ const darkThemeState = AppService.isDarkThemeEnabled();
+
if (isCamLocked === true) {
this.handleProceed();
return null;
@@ -1145,9 +1179,9 @@ class VideoPreview extends Component {
|| !PreviewService.getSkipVideoPreview()
|| forceOpen;
- const title = isVisualEffects
- ? intl.formatMessage(intlMessages.webcamEffectsTitle)
- : intl.formatMessage(intlMessages.webcamSettingsTitle);
+ const shouldShowVirtualBackgroundsTab = isVirtualBackgroundsEnabled
+ && !cameraAsContent
+ && !(webcamDeviceId === cameraAsContentDeviceId)
return (
- {deviceInfo.hasMediaDevices
- ? this.renderModalContent()
- : this.supportWarning()
- }
+
+
+
+
+
+
+ {this.getModalTitle()}
+
+
+ {shouldShowVirtualBackgroundsTab && (
+ <>
+
+
+
+ {intl.formatMessage(intlMessages.webcamVirtualBackgroundTitle)}
+
+ >
+ )}
+
+
+
+
+
+ {deviceInfo.hasMediaDevices
+ ? this.renderModalContent(selectedTab)
+ : this.supportWarning()
+ }
+
+
);
}
diff --git a/bigbluebutton-html5/imports/ui/components/video-preview/container.jsx b/bigbluebutton-html5/imports/ui/components/video-preview/container.jsx
index c8b80a3a92..3a911f082e 100755
--- a/bigbluebutton-html5/imports/ui/components/video-preview/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/video-preview/container.jsx
@@ -30,7 +30,8 @@ const VideoPreviewContainer = (props) => {
const hasVideoStream = useHasVideoStream();
const camCapReached = useHasCapReached();
const isCamLocked = useIsUserLocked();
- const webcamDeviceId = useStorageKey('WebcamDeviceId');
+ const settingsStorage = window.meetingClientSettings.public.app.userSettingsStorage;
+ const webcamDeviceId = useStorageKey('WebcamDeviceId', settingsStorage);
const isVirtualBackgroundsEnabled = useIsVirtualBackgroundsEnabled();
const isCustomVirtualBackgroundsEnabled = useIsCustomVirtualBackgroundsEnabled();
const isCameraAsContentBroadcasting = ScreenShareService.useIsCameraAsContentBroadcasting();
diff --git a/bigbluebutton-html5/imports/ui/components/video-preview/styles.js b/bigbluebutton-html5/imports/ui/components/video-preview/styles.js
index 22e94bd0c2..91ba70c922 100644
--- a/bigbluebutton-html5/imports/ui/components/video-preview/styles.js
+++ b/bigbluebutton-html5/imports/ui/components/video-preview/styles.js
@@ -1,12 +1,18 @@
import styled, { css, keyframes } from 'styled-components';
import {
+ borderSizeSmall,
borderSize,
borderSizeLarge,
+ mdPaddingX,
+ titlePositionLeft,
+ lgPaddingY,
} from '/imports/ui/stylesheets/styled-components/general';
import {
colorGrayLabel,
colorWhite,
+ colorBlack,
colorGrayLighter,
+ colorGrayLightest,
colorPrimary,
colorText,
} from '/imports/ui/stylesheets/styled-components/palette';
@@ -14,10 +20,16 @@ import {
fontSizeLarge,
lineHeightComputed,
headingsFontWeight,
+ fontSizeLarger,
+ fontSizeSmall,
} from '/imports/ui/stylesheets/styled-components/typography';
-import { smallOnly, landscape } from '/imports/ui/stylesheets/styled-components/breakpoints';
+import { smallOnly, mediumOnly, landscape } from '/imports/ui/stylesheets/styled-components/breakpoints';
import ModalSimple from '/imports/ui/components/common/modal/simple/component';
import ModalStyles from '/imports/ui/components/common/modal/simple/styles';
+import Button from '/imports/ui/components/common/button/component';
+import {
+ Tab, Tabs, TabList,
+} from 'react-tabs';
const Warning = styled.div`
text-align: center;
@@ -44,18 +56,59 @@ const Col = styled.div`
justify-content: center;
margin: 0 0.5rem 0 0.5rem;
- width: 50%;
+ @media ${smallOnly}, ${mediumOnly} {
+ justify-content: space-between;
+ align-items: center;
+ overflow: auto;
+ margin: 0;
+ }
+`;
+
+const BgnCol = styled.div`
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ justify-content: center;
+ margin: 0 0.5rem 0 0.5rem;
+
+ @media ${smallOnly} {
+ justify-content: space-between;
+ align-items: center;
+ margin: 0;
+ }
+`;
+
+const InternCol = styled.div`
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ justify-content: center;
+ margin: 0 0.5rem 0 0.5rem;
+
@media ${smallOnly} {
width: 90%;
- height: unset;
}
`;
+const ContentCol = styled.div`
+ width: 60%;
+ height: 25vh;
+
+ @media ${smallOnly} {
+ width: 90%;
+ }
+`;
+
+const BackgroundCol = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
const VideoCol = styled(Col)`
align-items: center;
@media ${landscape} {
- width: 33.3%;
+ width: 50%;
}
`;
@@ -94,14 +147,15 @@ const Content = styled.div`
display: flex;
justify-content: center;
align-items: center;
- overflow: auto;
+
color: ${colorText};
font-weight: normal;
- padding: ${lineHeightComputed} 0;
@media ${smallOnly} {
- flex-direction: column;
- margin: 0;
+ display: flex;
+ flex-wrap: wrap;
+ flex-direction: row;
+ margin: 5px;
}
`;
@@ -116,11 +170,23 @@ const BrowserWarning = styled.p`
const Footer = styled.div`
display: flex;
+ flex-direction: column;
+`;
+
+const FooterContainer = styled.div`
+ display: flex;
+ align-items: center;
+ justify-content: ${({ showStopAllButton }) => (showStopAllButton ? 'flex-start' : 'flex-end')};
+
+ @media ${smallOnly} {
+ display: flex;
+ flex-direction: column;
+ }
`;
const Actions = styled.div`
- margin-left: auto;
- margin-right: auto;
+ display: flex;
+ justify-content: flex-end;
[dir="rtl"] & {
margin-right: auto;
@@ -167,7 +233,6 @@ const VideoPreviewModal = styled(ModalSimple)`
@media ${smallOnly} {
height: unset;
min-height: 22.5rem;
- max-height: unset;
}
${({ isPhone }) => isPhone && `
@@ -244,17 +309,120 @@ const MarkerDynamicWrapper = styled.div`
user-select: none;
`;
+const Container = styled.div`
+ padding: 0 calc(${mdPaddingX} / 2 + ${borderSize});
+`;
+
+const Header = styled.div`
+ margin: 0;
+ padding: 0;
+ border: none;
+ line-height: ${titlePositionLeft};
+ margin-bottom: ${lgPaddingY};
+`;
+
+const WebcamTabs = styled(Tabs)`
+ display: flex;
+ flex-flow: column;
+
+ &:hover {
+ cursor: pointer;
+ }
+
+`;
+
+const WebcamTabList = styled(TabList)`
+ display: flex;
+ justify-content: space-around;
+ padding: 0;
+ list-style-type: none;
+`;
+
+const WebcamTabSelector = styled(Tab)`
+ display: flex;
+ justify-content: center;
+ flex-grow: 1;
+ text-align: center;
+ font-weight: bold;
+ color: ${colorGrayLighter};
+
+ &.is-selected {
+ border: none;
+ color: ${colorBlack};
+ }
+`;
+
+const HeaderSeparator = styled.div`
+ border-left: 1px solid ${colorText};
+ content: '|';
+ margin: 0 1.5rem;
+ height: 1.5rem;
+ align-self: center;
+ opacity: 0.75;
+`;
+
+const BottomSeparator = styled.div`
+ position: relative;
+ width: 100%;
+ height: ${borderSizeSmall};
+ background-color: ${colorGrayLightest};
+ margin-top: calc(${lineHeightComputed} * 1.25);
+ margin-bottom: calc(${lineHeightComputed} * 1.25);
+`;
+
+const IconSvg = styled.img`
+ height: ${fontSizeLarger};
+ border-radius: 5px;
+ margin: 5px;
+
+ ${({ darkThemeState }) => darkThemeState && css`
+ filter: invert(1);
+ `}
+
+`;
+
+const SharingButton = styled(Button)`
+ margin: 0 0.5rem;
+ height: 2.5rem;
+`;
+
+const CancelButton = styled(Button)`
+ margin: 0 0.5rem;
+ height: 2.5rem;
+`;
+
+const StopAllButton = styled(Button)`
+ margin: 0 0.5rem;
+ height: 2.5rem;
+`;
+
export default {
Warning,
Main,
Text,
Col,
+ BgnCol,
+ ContentCol,
+ InternCol,
+ Container,
+ Header,
+ WebcamTabs,
+ WebcamTabList,
+ WebcamTabSelector,
+ HeaderSeparator,
+ BottomSeparator,
VideoCol,
+ BackgroundCol,
+ IconSvg,
+ SharingButton,
+ CancelButton,
+ StopAllButton,
Label,
Select,
Content,
BrowserWarning,
Footer,
+ FooterContainer,
Actions,
ExtraActions,
VideoPreviewModal,
diff --git a/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/component.jsx b/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/component.jsx
index 5687d94189..f61353c9a8 100644
--- a/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/component.jsx
+++ b/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/component.jsx
@@ -51,7 +51,6 @@ const VirtualBgSelector = ({
locked,
showThumbnails = false,
initialVirtualBgState = defaultInitialVirtualBgState,
- isVisualEffects,
readFile,
isCustomVirtualBackgroundsEnabled,
}) => {
@@ -269,7 +268,6 @@ const VirtualBgSelector = ({
return (
{ inputElementsRef.current[index] = ref; }}
onClick={() => _virtualBgSelected(EFFECT_TYPES.BLUR_TYPE, 'Blur', index)}
- isVisualEffects={isVisualEffects}
/>
{intl.formatMessage(intlMessages.camBgAriaDesc, { 0: EFFECT_TYPES.BLUR_TYPE })}
@@ -300,7 +297,6 @@ const VirtualBgSelector = ({
return (
inputElementsRef.current[index] = ref}
onClick={() => _virtualBgSelected(EFFECT_TYPES.IMAGE_TYPE, imageName, index)}
disabled={disabled}
- isVisualEffects={isVisualEffects}
background={getVirtualBackgroundThumbnail(imageName)}
data-test="selectDefaultBackground"
/>
@@ -334,7 +329,6 @@ const VirtualBgSelector = ({
return (
@@ -399,7 +392,6 @@ const VirtualBgSelector = ({
customBgSelectorRef.current.click();
}
}}
- isVisualEffects={isVisualEffects}
data-test="inputBackgroundButton"
/>
_virtualBgSelected(EFFECT_TYPES.NONE_TYPE)}
- isVisualEffects={isVisualEffects}
data-test="noneBackgroundButton"
/>
@@ -454,7 +445,6 @@ const VirtualBgSelector = ({
@@ -507,13 +497,13 @@ const VirtualBgSelector = ({
return (
<>
- {!isVisualEffects && (
-
- {!isVirtualBackgroundSupported()
- ? intl.formatMessage(intlMessages.virtualBackgroundSettingsDisabledLabel)
- : intl.formatMessage(intlMessages.virtualBackgroundSettingsLabel)}
-
- )}
+
+ {intl.formatMessage(
+ isVirtualBackgroundSupported()
+ ? intlMessages.virtualBackgroundSettingsLabel
+ : intlMessages.virtualBackgroundSettingsDisabledLabel,
+ )}
+
{renderSelector()}
>
diff --git a/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/styles.js b/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/styles.js
index ec2db6c2b4..47147972d1 100644
--- a/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/styles.js
+++ b/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/styles.js
@@ -16,28 +16,27 @@ import {
} from '/imports/ui/stylesheets/styled-components/palette';
import { ScrollboxVertical } from '/imports/ui/stylesheets/styled-components/scrollable';
import { fontSizeSmallest } from '/imports/ui/stylesheets/styled-components/typography';
+import { smallOnly, mediumOnly } from '/imports/ui/stylesheets/styled-components/breakpoints';
import Button from '/imports/ui/components/common/button/component';
const VirtualBackgroundRowThumbnail = styled.div`
- margin-top: 0.4rem;
+ margin: 0.4rem;
`;
const BgWrapper = styled(ScrollboxVertical)`
display: flex;
justify-content: flex-start;
- overflow-x: auto;
+ max-width: 272px;
+ max-height: 216px;
+ flex-wrap: wrap;
+ overflow-y: auto;
margin: ${borderSizeLarge};
padding: ${borderSizeLarge};
- ${({ isVisualEffects }) => isVisualEffects && `
- height: 15rem;
- flex-wrap: wrap;
- align-content: flex-start;
- `}
-
- ${({ brightnessEnabled, isVisualEffects }) => brightnessEnabled && isVisualEffects && `
- height: 10rem;
- `}
+ @media ${smallOnly}, ${mediumOnly} {
+ justify-content: center;
+ max-height: 22vh;
+ }
`;
const BgNoneButton = styled(Button)`
@@ -45,12 +44,8 @@ const BgNoneButton = styled(Button)`
height: 48px;
width: 48px;
border: ${borderSizeSmall} solid ${userThumbnailBorder};
- margin: 0 0.15rem;
+ margin: 0.5rem 0.5rem;
flex-shrink: 0;
-
- ${({ isVisualEffects }) => isVisualEffects && `
- margin: 0.15rem;
- `}
`;
const ThumbnailButton = styled(Button)`
@@ -131,11 +126,7 @@ const Label = styled.label`
const ThumbnailButtonWrapper = styled.div`
position: relative;
- margin: 0 0.15rem;
-
- ${({ isVisualEffects }) => isVisualEffects && `
- margin: 0.15rem;
- `}
+ margin: 0.5rem 0.5rem;
`;
const ButtonWrapper = styled.div`
@@ -177,4 +168,4 @@ export default {
ButtonRemove,
BgCustomButton,
SkeletonWrapper,
-};
\ No newline at end of file
+};
diff --git a/bigbluebutton-html5/imports/ui/components/video-provider/video-button/component.tsx b/bigbluebutton-html5/imports/ui/components/video-provider/video-button/component.tsx
index 791de655cf..6f7a710a1c 100755
--- a/bigbluebutton-html5/imports/ui/components/video-provider/video-button/component.tsx
+++ b/bigbluebutton-html5/imports/ui/components/video-provider/video-button/component.tsx
@@ -5,7 +5,6 @@ import { IntlShape, defineMessages, injectIntl } from 'react-intl';
import deviceInfo from '/imports/utils/deviceInfo';
import { debounce } from '/imports/utils/debounce';
import BBBMenu from '/imports/ui/components/common/menu/component';
-import { useIsVirtualBackgroundsEnabled } from '/imports/ui/services/features';
import Button from '/imports/ui/components/common/button/component';
import VideoPreviewContainer from '/imports/ui/components/video-preview/container';
import { CameraSettingsDropdownItemType } from 'bigbluebutton-html-plugin-sdk/dist/cjs/extensible-areas/camera-settings-dropdown-item/enums';
@@ -87,15 +86,9 @@ const JoinVideoButton: React.FC = ({
const isDesktopSharingCamera = hasVideoStream && !isMobile;
const ENABLE_WEBCAM_SELECTOR_BUTTON = window.meetingClientSettings.public.app.enableWebcamSelectorButton;
- const ENABLE_CAMERA_BRIGHTNESS = window.meetingClientSettings.public.app.enableCameraBrightness;
const shouldEnableWebcamSelectorButton = ENABLE_WEBCAM_SELECTOR_BUTTON
&& isDesktopSharingCamera;
- const isVirtualBackgroundsEnabled = useIsVirtualBackgroundsEnabled();
- const shouldEnableWebcamVisualEffectsButton = (isVirtualBackgroundsEnabled
- || ENABLE_CAMERA_BRIGHTNESS)
- && hasVideoStream
- && !isMobile;
const exitVideo = () => isDesktopSharingCamera && (!VideoService.isMultipleCamerasEnabled()
|| shouldEnableWebcamSelectorButton);
@@ -168,16 +161,6 @@ const JoinVideoButton: React.FC = ({
);
}
- if (shouldEnableWebcamVisualEffectsButton) {
- actions.push(
- {
- key: 'virtualBgSelection',
- label: intl.formatMessage(intlMessages.visualEffects),
- onClick: () => handleOpenAdvancedOptions(() => setPropsToPassModal({ isVisualEffects: true })),
- },
- );
- }
-
if (actions.length === 0) return null;
const customStyles = { top: '-3.6rem' };
diff --git a/bigbluebutton-html5/public/resources/images/webcam_background.svg b/bigbluebutton-html5/public/resources/images/webcam_background.svg
new file mode 100644
index 0000000000..aaee50e146
--- /dev/null
+++ b/bigbluebutton-html5/public/resources/images/webcam_background.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/bigbluebutton-html5/public/resources/images/webcam_settings.svg b/bigbluebutton-html5/public/resources/images/webcam_settings.svg
new file mode 100644
index 0000000000..1e08ee4ea6
--- /dev/null
+++ b/bigbluebutton-html5/public/resources/images/webcam_settings.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/bigbluebutton-tests/playwright/core/elements.js b/bigbluebutton-tests/playwright/core/elements.js
index f83ef59ea0..028137dfb8 100644
--- a/bigbluebutton-tests/playwright/core/elements.js
+++ b/bigbluebutton-tests/playwright/core/elements.js
@@ -429,7 +429,9 @@ exports.advancedVideoSettingsBtn = 'li[data-test="advancedVideoSettingsButton"]'
exports.mirrorWebcamBtn = 'li[data-test="mirrorWebcamBtn"]';
exports.focusWebcamBtn = 'li[data-test="focusWebcamBtn"]';
exports.pinWebcamBtn = 'li[data-test="pinWebcamBtn"]';
-exports.webcamFullscreenButton = 'button[data-test="webcamFullscreenButton"]';
+exports.webcamsFullscreenButton = 'li[data-test="webcamsFullscreenButton"]';
+exports.webcamSettingsTitle = 'span[id="webcam-settings-title"]';
+exports.backgroundSettingsTitle = 'span[id="backgrounds-title"]';
exports.selectDefaultBackground = 'button[data-test="selectDefaultBackground"]';
exports.selectCustomBackground = 'button[data-test="selectCustomBackground"]';
exports.removeCustomBackground = 'button[data-test="removeCustomBackground"]';
diff --git a/bigbluebutton-tests/playwright/parameters/disabledFeatures.js b/bigbluebutton-tests/playwright/parameters/disabledFeatures.js
index c61c6c719a..a6511bc0af 100644
--- a/bigbluebutton-tests/playwright/parameters/disabledFeatures.js
+++ b/bigbluebutton-tests/playwright/parameters/disabledFeatures.js
@@ -18,7 +18,7 @@ class DisabledFeatures extends MultiUsers {
await this.modPage.waitForSelector(e.audioModal, ELEMENT_WAIT_LONGER_TIME);
- if(speechRecognitionEnabled) {
+ if (speechRecognitionEnabled) {
await this.modPage.wasRemoved(e.speechRecognition);
} else {
await this.modPage.wasRemoved(e.speechRecognitionUnsupported);
@@ -64,7 +64,7 @@ class DisabledFeatures extends MultiUsers {
async virtualBackgrounds() {
await this.modPage.waitAndClick(e.joinVideo);
- await this.modPage.wasRemoved(e.virtualBackgrounds);
+ await this.modPage.wasRemoved(e.backgroundSettingsTitle);
}
async downloadPresentationWithAnnotations() {
@@ -93,8 +93,8 @@ class DisabledFeatures extends MultiUsers {
}
async customVirtualBackground() {
- await this.modPage.waitAndClick (e.joinVideo);
- await this.modPage.waitForSelector(e.webcamSettingsModal);
+ await this.modPage.waitAndClick(e.joinVideo);
+ await this.modPage.waitAndClick(e.backgroundSettingsTitle);
await this.modPage.wasRemoved(e.inputBackgroundButton);
}
@@ -123,7 +123,7 @@ class DisabledFeatures extends MultiUsers {
await this.modPage.waitForSelector(e.audioModal, ELEMENT_WAIT_LONGER_TIME);
- if(speechRecognitionEnabled) {
+ if (speechRecognitionEnabled) {
await this.modPage.wasRemoved(e.speechRecognition);
} else {
await this.modPage.wasRemoved(e.speechRecognitionUnsupported);
@@ -169,6 +169,7 @@ class DisabledFeatures extends MultiUsers {
async virtualBackgroundsExclude() {
await this.modPage.waitAndClick(e.joinVideo);
+ await this.modPage.waitAndClick(e.backgroundSettingsTitle);
await this.modPage.hasElement(e.virtualBackgrounds);
}
@@ -199,8 +200,8 @@ class DisabledFeatures extends MultiUsers {
}
async customVirtualBackgroundExclude() {
- await this.modPage.waitAndClick (e.joinVideo);
- await this.modPage.waitForSelector(e.webcamSettingsModal);
+ await this.modPage.waitAndClick(e.joinVideo);
+ await this.modPage.waitAndClick(e.backgroundSettingsTitle);
await this.modPage.hasElement(e.inputBackgroundButton);
}
diff --git a/bigbluebutton-tests/playwright/webcam/webcam.js b/bigbluebutton-tests/playwright/webcam/webcam.js
index fe11609412..df89a56419 100644
--- a/bigbluebutton-tests/playwright/webcam/webcam.js
+++ b/bigbluebutton-tests/playwright/webcam/webcam.js
@@ -63,6 +63,7 @@ class Webcam extends Page {
async applyBackground() {
await this.waitAndClick(e.joinVideo);
+ await this.waitAndClick(e.backgroundSettingsTitle);
await this.waitForSelector(e.noneBackgroundButton);
await this.waitAndClick(`${e.selectDefaultBackground}[aria-label="Home"]`);
await sleep(1000);
@@ -75,11 +76,14 @@ class Webcam extends Page {
async webcamFullscreen() {
await this.shareWebcam();
// get default viewport sizes
- const { windowWidth, windowHeight } = await this.page.evaluate(() => { return {
- windowWidth: window.innerWidth,
- windowHeight: window.innerHeight,
- }});
- await this.waitAndClick(e.webcamFullscreenButton);
+ const { windowWidth, windowHeight } = await this.page.evaluate(() => {
+ return {
+ windowWidth: window.innerWidth,
+ windowHeight: window.innerHeight,
+ }
+ });
+ await this.waitAndClick(e.dropdownWebcamButton);
+ await this.waitAndClick(e.webcamsFullscreenButton);
// get fullscreen webcam size
const { width, height } = await this.getLocator('video').boundingBox();
await expect(width + 1).toBe(windowWidth); // not sure why there is a difference of 1 pixel
@@ -88,6 +92,7 @@ class Webcam extends Page {
async disableSelfView() {
await this.waitAndClick(e.joinVideo);
+ await this.waitAndClick(e.backgroundSettingsTitle);
await this.waitForSelector(e.noneBackgroundButton);
await uploadBackgroundVideoImage(this);
@@ -105,6 +110,7 @@ class Webcam extends Page {
async managingNewBackground() {
await this.waitAndClick(e.joinVideo);
+ await this.waitAndClick(e.backgroundSettingsTitle);
await this.waitForSelector(e.noneBackgroundButton);
// Upload
@@ -121,12 +127,14 @@ class Webcam extends Page {
// Remove
await this.waitAndClick(e.videoDropdownMenu);
await this.waitAndClick(e.advancedVideoSettingsBtn);
+ await this.waitAndClick(e.backgroundSettingsTitle);
await this.waitAndClick(e.removeCustomBackground);
await this.wasRemoved(e.selectCustomBackground);
}
async keepBackgroundWhenRejoin(context) {
await this.waitAndClick(e.joinVideo);
+ await this.waitAndClick(e.backgroundSettingsTitle);
await this.waitForSelector(e.noneBackgroundButton);
await uploadBackgroundVideoImage(this);
// Create a new page before closing the previous to not close the current context
@@ -135,6 +143,7 @@ class Webcam extends Page {
const openedPage = await this.getLastTargetPage(context);
await openedPage.init(true, true, { meetingId: this.meetingId });
await openedPage.waitAndClick(e.joinVideo);
+ await openedPage.waitAndClick(e.backgroundSettingsTitle);
await openedPage.hasElement(e.selectCustomBackground);
}
diff --git a/bigbluebutton-tests/playwright/webcam/webcam.spec.js-snapshots/custom-background-item-Chromium-linux.png b/bigbluebutton-tests/playwright/webcam/webcam.spec.js-snapshots/custom-background-item-Chromium-linux.png
index 2670a576d9..c41928d95c 100644
Binary files a/bigbluebutton-tests/playwright/webcam/webcam.spec.js-snapshots/custom-background-item-Chromium-linux.png and b/bigbluebutton-tests/playwright/webcam/webcam.spec.js-snapshots/custom-background-item-Chromium-linux.png differ