fix(video): webcam fails to be loaded on preview when changing profiles
There's an issue where permission-less sessions of video-preview fail to change video profiles. Whenever gUM is on prompt mode, deviceIds are obfuscated, which means getInitialCamera will need to infer the deviceId based on the current media stream. Since the virtual bg worker is now called synchronously (e28a595
), it'll be extracted incorrectly from the virtual effect MediaStream (rather than the original stream) - which causes getInitialCamera to use the effect's deviceId rather than the original stream's deviceId. Guarantee that deviceId inference via MediaStreamTrack uses BBBVideoStream's originalStream (so that virtual effect streams are bypassed). Also remove the call to updateDeviceId in getInitialCamera since it's redundant since commite28a595
.
This commit is contained in:
parent
6ec1272a2b
commit
2c6de02f1c
@ -646,7 +646,7 @@ class VideoPreview extends Component {
|
|||||||
|
|
||||||
if (!actualDeviceId && this.currentVideoStream) {
|
if (!actualDeviceId && this.currentVideoStream) {
|
||||||
actualDeviceId = MediaStreamUtils.extractDeviceIdFromStream(
|
actualDeviceId = MediaStreamUtils.extractDeviceIdFromStream(
|
||||||
this.currentVideoStream.mediaStream,
|
this.currentVideoStream.originalStream,
|
||||||
'video',
|
'video',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -660,9 +660,7 @@ class VideoPreview extends Component {
|
|||||||
? PreviewService.getDefaultProfile()
|
? PreviewService.getDefaultProfile()
|
||||||
: PreviewService.getCameraAsContentProfile();
|
: PreviewService.getCameraAsContentProfile();
|
||||||
|
|
||||||
return this.getCameraStream(deviceId, defaultProfile).then(() => {
|
return this.getCameraStream(deviceId, defaultProfile);
|
||||||
this.updateDeviceId(deviceId);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async startEffects(deviceId) {
|
async startEffects(deviceId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user