fix(local-rec) Handle no mic permission (#12862)
This commit is contained in:
parent
749c26b74c
commit
12318db4c7
|
@ -916,6 +916,7 @@
|
|||
"localRecordingVideoWarning": "To record your video you must have it on when starting the recording",
|
||||
"localRecordingWarning": "Make sure you select the current tab in order to use the right video and audio. The recording is currently limited to 1GB, which is around 100 minutes.",
|
||||
"loggedIn": "Logged in as {{userName}}",
|
||||
"noMicPermission": "Microphone track could not be created. Please grant permission to use the microphone.",
|
||||
"noStreams": "No audio or video stream detected.",
|
||||
"off": "Recording stopped",
|
||||
"offBy": "{{name}} stopped the recording",
|
||||
|
|
|
@ -231,6 +231,11 @@ const LocalRecordingManager: ILocalRecordingManager = {
|
|||
});
|
||||
}
|
||||
|
||||
// handle no mic permission
|
||||
if (!getLocalTrack(getTrackState(getState()), MEDIA_TYPE.AUDIO)?.jitsiTrack?.track) {
|
||||
throw new Error('NoMicTrack');
|
||||
}
|
||||
|
||||
const currentTitle = document.title;
|
||||
|
||||
document.title = i18next.t('localRecording.selectTabTitle');
|
||||
|
|
|
@ -163,6 +163,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
|||
|
||||
} else if (err.message === 'NoLocalStreams') {
|
||||
descriptionKey = 'recording.noStreams';
|
||||
} else if (err.message === 'NoMicTrack') {
|
||||
descriptionKey = 'recording.noMicPermission';
|
||||
}
|
||||
const props = {
|
||||
descriptionKey,
|
||||
|
|
Loading…
Reference in New Issue