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) {
|
||||
actualDeviceId = MediaStreamUtils.extractDeviceIdFromStream(
|
||||
this.currentVideoStream.mediaStream,
|
||||
this.currentVideoStream.originalStream,
|
||||
'video',
|
||||
);
|
||||
}
|
||||
@ -660,9 +660,7 @@ class VideoPreview extends Component {
|
||||
? PreviewService.getDefaultProfile()
|
||||
: PreviewService.getCameraAsContentProfile();
|
||||
|
||||
return this.getCameraStream(deviceId, defaultProfile).then(() => {
|
||||
this.updateDeviceId(deviceId);
|
||||
});
|
||||
return this.getCameraStream(deviceId, defaultProfile);
|
||||
}
|
||||
|
||||
async startEffects(deviceId) {
|
||||
|
Loading…
Reference in New Issue
Block a user