Merge pull request #15592 from JoVictorNunes/missing-custom-bg-param

fix: add missing custom virtual background param
This commit is contained in:
Paulo Lanzarin 2022-08-25 09:25:45 -03:00 committed by GitHub
commit b43b31d5d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -354,13 +354,13 @@ class VideoPreview extends Component {
};
// Resolves into true if the background switch is successful, false otherwise
handleVirtualBgSelected(type, name) {
handleVirtualBgSelected(type, name, customParams) {
const { sharedDevices } = this.props;
const { webcamDeviceId } = this.state;
const shared = sharedDevices.includes(webcamDeviceId);
if (type !== EFFECT_TYPES.NONE_TYPE) {
return this.startVirtualBackground(this.currentVideoStream, type, name).then((switched) => {
return this.startVirtualBackground(this.currentVideoStream, type, name, customParams).then((switched) => {
// If it's not shared we don't have to update here because
// it will be updated in the handleStartSharing method.
if (switched && shared) this.updateVirtualBackgroundInfo();