Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(recording) skip consent dialog on Spot TV
Saúl Ibarra Corretgé7cf8902fdd4f
diff --git a/react/features/base/util/spot.ts b/react/features/base/util/spot.tsnew file mode 100644index 0000000000..fd56bd9e49--- /dev/null+++ b/react/features/base/util/spot.ts@@ -0,0 +1,9 @@++/**+ * Checks if Jitsi Meet is running on Spot TV.+ *+ * @returns {boolean} Whether or not Jitsi Meet is running on Spot TV.+ */+export function isSpotTV(): boolean {+ return navigator.userAgent.includes('SpotElectron/');+}diff --git a/react/features/large-video/components/LargeVideo.web.tsx b/react/features/large-video/components/LargeVideo.web.tsxindex 7d28c3afb6..328230af0a 100644--- a/react/features/large-video/components/LargeVideo.web.tsx+++ b/react/features/large-video/components/LargeVideo.web.tsx@@ -11,6 +11,7 @@ import Watermarks from '../../base/react/components/web/Watermarks';import { getHideSelfView } from '../../base/settings/functions.any';import { getVideoTrackByParticipant } from '../../base/tracks/functions.web';import { setColorAlpha } from '../../base/util/helpers';+import { isSpotTV } from '../../base/util/spot';import StageParticipantNameLabel from '../../display-name/components/web/StageParticipantNameLabel';import { FILMSTRIP_BREAKPOINT } from '../../filmstrip/constants';import { getVerticalViewMaxWidth, isFilmstripResizable } from '../../filmstrip/functions.web';@@ -24,8 +25,6 @@ import { getLargeVideoParticipant } from '../functions';import ScreenSharePlaceholder from './ScreenSharePlaceholder.web';-// Hack to detect Spot.-const SPOT_DISPLAY_NAME = 'Meeting Room';interface IProps {@@ -364,20 +363,20 @@ function _mapStateToProps(state: IReduxState) {const { backgroundColor, backgroundImageUrl } = state['features/dynamic-branding'];const { isOpen: isChatOpen } = state['features/chat'];const { width: verticalFilmstripWidth, visible } = state['features/filmstrip'];- const { defaultLocalDisplayName, hideDominantSpeakerBadge } = state['features/base/config'];+ const { hideDominantSpeakerBadge } = state['features/base/config'];const { seeWhatIsBeingShared } = state['features/large-video'];const localParticipantId = getLocalParticipant(state)?.id;const largeVideoParticipant = getLargeVideoParticipant(state);const videoTrack = getVideoTrackByParticipant(state, largeVideoParticipant);const isLocalScreenshareOnLargeVideo = largeVideoParticipant?.id?.includes(localParticipantId ?? '')&& videoTrack?.videoType === VIDEO_TYPE.DESKTOP;- const isOnSpot = defaultLocalDisplayName === SPOT_DISPLAY_NAME;return {_backgroundAlpha: state['features/base/config'].backgroundAlpha,_customBackgroundColor: backgroundColor,_customBackgroundImageUrl: backgroundImageUrl,- _displayScreenSharingPlaceholder: Boolean(isLocalScreenshareOnLargeVideo && !seeWhatIsBeingShared && !isOnSpot),+ _displayScreenSharingPlaceholder:+ Boolean(isLocalScreenshareOnLargeVideo && !seeWhatIsBeingShared && !isSpotTV()),_hideSelfView: getHideSelfView(state),_isChatOpen: isChatOpen,_isDisplayNameVisible: isDisplayNameVisible(state),diff --git a/react/features/recording/functions.ts b/react/features/recording/functions.tsindex f3c3dcd995..5065d623c5 100644--- a/react/features/recording/functions.ts+++ b/react/features/recording/functions.ts@@ -8,6 +8,7 @@ import { JitsiRecordingConstants, browser } from '../base/lib-jitsi-meet';import { getSoundFileSrc } from '../base/media/functions';import { getLocalParticipant, getRemoteParticipants } from '../base/participants/functions';import { registerSound, unregisterSound } from '../base/sounds/actions';+import { isSpotTV } from '../base/util/spot';import { isInBreakoutRoom as isInBreakoutRoomF } from '../breakout-rooms/functions';import { isEnabled as isDropboxEnabled } from '../dropbox/functions';import { extractFqnFromPath } from '../dynamic-branding/functions.any';@@ -448,6 +449,10 @@ export function shouldRequireRecordingConsent(recorderSession: any, state: IRedureturn false;}+ if (isSpotTV()) {+ return false;+ }+if (!requireConsent && !requireRecordingConsent) {return false;}