feat(local-recording) Change tab title to help identifying it (#12294)

pull/12295/head jitsi-meet_7877
Robert Pintilii 2 years ago committed by GitHub
parent 090433b6e8
commit 21bcbdc12f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      lang/main.json
  2. 15
      react/features/recording/components/Recording/LocalRecordingManager.web.ts

@ -623,6 +623,7 @@
"no": "No", "no": "No",
"participant": "Participant", "participant": "Participant",
"participantStats": "Participant Stats", "participantStats": "Participant Stats",
"selectTabTitle": "🎥 Please select this tab for recording",
"sessionToken": "Session Token", "sessionToken": "Session Token",
"start": "Start Recording", "start": "Start Recording",
"stop": "Stop Recording", "stop": "Stop Recording",

@ -1,19 +1,16 @@
/* eslint-disable lines-around-comment */ /* eslint-disable lines-around-comment */
import i18next from 'i18next';
import { v4 as uuidV4 } from 'uuid'; import { v4 as uuidV4 } from 'uuid';
import fixWebmDuration from 'webm-duration-fix'; import fixWebmDuration from 'webm-duration-fix';
import { IStore } from '../../../app/types'; import { IStore } from '../../../app/types';
// @ts-ignore import { getRoomName } from '../../../base/conference/functions';
import { getRoomName } from '../../../base/conference';
import { MEDIA_TYPE } from '../../../base/media/constants'; import { MEDIA_TYPE } from '../../../base/media/constants';
// @ts-ignore import { getLocalTrack, getTrackState } from '../../../base/tracks/functions';
import { getLocalTrack, getTrackState } from '../../../base/tracks';
import { inIframe } from '../../../base/util/iframeUtils'; import { inIframe } from '../../../base/util/iframeUtils';
// @ts-ignore // @ts-ignore
import { stopLocalVideoRecording } from '../../actions.any'; import { stopLocalVideoRecording } from '../../actions.any';
declare let APP: any;
interface SelfRecording { interface SelfRecording {
on: boolean; on: boolean;
withVideo: boolean; withVideo: boolean;
@ -186,7 +183,7 @@ const LocalRecordingManager: ILocalRecordingManager = {
this.selfRecording.on = onlySelf; this.selfRecording.on = onlySelf;
this.recordingData = []; this.recordingData = [];
this.roomName = getRoomName(getState()); this.roomName = getRoomName(getState()) ?? '';
let gdmStream: MediaStream = new MediaStream(); let gdmStream: MediaStream = new MediaStream();
const tracks = getTrackState(getState()); const tracks = getTrackState(getState());
@ -223,6 +220,9 @@ const LocalRecordingManager: ILocalRecordingManager = {
}); });
} }
const currentTitle = document.title;
document.title = i18next.t('localRecording.selectTabTitle');
// @ts-ignore // @ts-ignore
gdmStream = await navigator.mediaDevices.getDisplayMedia({ gdmStream = await navigator.mediaDevices.getDisplayMedia({
// @ts-ignore // @ts-ignore
@ -235,6 +235,7 @@ const LocalRecordingManager: ILocalRecordingManager = {
noiseSuppression: false noiseSuppression: false
} }
}); });
document.title = currentTitle;
// @ts-ignore // @ts-ignore
const isBrowser = gdmStream.getVideoTracks()[0].getSettings().displaySurface === 'browser'; const isBrowser = gdmStream.getVideoTracks()[0].getSettings().displaySurface === 'browser';

Loading…
Cancel
Save