mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Setting the UA string in Electron doesn't propagate the change to the
iframe where the meeting is loaded (🤦).
Thus make it more resilient by trying different things:
- A freshly introduced "iAmSpot" config option, similar to Jibri
- The app ID is present in the UA string, so we can test for that
- As a last-ditch effort, check if the display name is the default
"Meeting Room"
17 lines
602 B
TypeScript
17 lines
602 B
TypeScript
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(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';
|
|
}
|