fix(video): camera cannot be shared as content

A change in e28a595b52 introduced an issue where the "Share camera as
content" modal always has it's "share" action flagged as disabled. This
is due to a short-circuit introduced in the initial gUM procedure that
does not clear the "disabled" state before exiting.

Properly reset the "disabled" sharing state after the initial gUM in
video-preview when "Share camera as content" is used, thus fixing the
aforementioned issue.
This commit is contained in:
prlanzarin 2024-08-01 14:33:52 -03:00
parent 894515ddb6
commit 6ec1272a2b

View File

@ -735,7 +735,13 @@ class VideoPreview extends Component {
this.currentVideoStream = bbbVideoStream; this.currentVideoStream = bbbVideoStream;
this.updateDeviceId(deviceId); this.updateDeviceId(deviceId);
if (cameraAsContent) return Promise.resolve(true); if (cameraAsContent) {
this.setState({
isStartSharingDisabled: false,
});
return Promise.resolve(true);
}
return this.startEffects(deviceId) return this.startEffects(deviceId)
.catch((error) => { .catch((error) => {