diff --git a/react/features/base/config/configType.ts b/react/features/base/config/configType.ts index c1bf893c3e..4c8d16b78f 100644 --- a/react/features/base/config/configType.ts +++ b/react/features/base/config/configType.ts @@ -442,6 +442,7 @@ export interface IConfig { }; iAmRecorder?: boolean; iAmSipGateway?: boolean; + iAmSpot?: boolean; ignoreStartMuted?: boolean; inviteAppName?: string | null; inviteServiceCallFlowsUrl?: string; diff --git a/react/features/base/config/configWhitelist.ts b/react/features/base/config/configWhitelist.ts index 729e647de5..b5c2a69760 100644 --- a/react/features/base/config/configWhitelist.ts +++ b/react/features/base/config/configWhitelist.ts @@ -170,6 +170,7 @@ export default [ 'hideLobbyButton', 'iAmRecorder', 'iAmSipGateway', + 'iAmSpot', 'ignoreStartMuted', 'inviteAppName', 'liveStreaming.enabled', diff --git a/react/features/base/util/spot.ts b/react/features/base/util/spot.ts index fd56bd9e49..10ec4f264c 100644 --- a/react/features/base/util/spot.ts +++ b/react/features/base/util/spot.ts @@ -1,9 +1,16 @@ +import { IReduxState } from '../../app/types'; /** * Checks if Jitsi Meet is running on Spot TV. * + * @param {IReduxState} state - The redux state. * @returns {boolean} Whether or not Jitsi Meet is running on Spot TV. */ -export function isSpotTV(): boolean { - return navigator.userAgent.includes('SpotElectron/'); +export function isSpotTV(state: IReduxState): boolean { + const { defaultLocalDisplayName, iAmSpot } = state['features/base/config'] || {}; + + return iAmSpot + || navigator.userAgent.includes('JitsiSpot/') // Jitsi Spot app + || navigator.userAgent.includes('8x8MeetingRooms/') // 8x8 Meeting Rooms app + || defaultLocalDisplayName === 'Meeting Room'; } diff --git a/react/features/large-video/components/LargeVideo.web.tsx b/react/features/large-video/components/LargeVideo.web.tsx index 3bd896d78e..2263fd2b53 100644 --- a/react/features/large-video/components/LargeVideo.web.tsx +++ b/react/features/large-video/components/LargeVideo.web.tsx @@ -383,7 +383,7 @@ function _mapStateToProps(state: IReduxState) { _customBackgroundColor: backgroundColor, _customBackgroundImageUrl: backgroundImageUrl, _displayScreenSharingPlaceholder: - Boolean(isLocalScreenshareOnLargeVideo && !seeWhatIsBeingShared && !isSpotTV()), + Boolean(isLocalScreenshareOnLargeVideo && !seeWhatIsBeingShared && !isSpotTV(state)), _hideSelfView: getHideSelfView(state), _isChatOpen: isChatOpen, _isDisplayNameVisible: isDisplayNameVisible(state), diff --git a/react/features/recording/functions.ts b/react/features/recording/functions.ts index 45a81c14d6..6320e84187 100644 --- a/react/features/recording/functions.ts +++ b/react/features/recording/functions.ts @@ -450,7 +450,7 @@ export function shouldRequireRecordingConsent(recorderSession: any, state: IRedu return false; } - if (isSpotTV()) { + if (isSpotTV(state)) { return false; }