Skip to content

Commit

Permalink
Merge pull request #15558 from JoVictorNunes/issue-15555
Browse files Browse the repository at this point in the history
fix: check virtual background type on change
  • Loading branch information
ramonlsouza committed Sep 9, 2022
2 parents 23fc594 + 66403fe commit 5588e19
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,22 @@ class VirtualBackgroundService {

changeBackgroundImage(parameters = null) {
const virtualBackgroundImagePath = getVirtualBgImagePath();
let imagesrc = virtualBackgroundImagePath + '';
let name = '';
let type = 'blur';
let isVirtualBackground = false;
if (parameters != null && Object.keys(parameters).length > 0) {
imagesrc = parameters.name;
name = parameters.name;
type = parameters.type;
this._options.virtualBackground.isVirtualBackground = parameters.isVirtualBackground;
isVirtualBackground = parameters.isVirtualBackground;
}
this._options.virtualBackground.virtualSource = virtualBackgroundImagePath + name;
this._options.virtualBackground.backgroundType = type;
this._options.virtualBackground.isVirtualBackground = isVirtualBackground;
if (this._options.virtualBackground.backgroundType === 'image') {
this._virtualImage = document.createElement('img');
this._virtualImage.crossOrigin = 'anonymous';
this._virtualImage.src = virtualBackgroundImagePath + name;
}
this._virtualImage = document.createElement('img');
this._virtualImage.crossOrigin = 'anonymous';
this._virtualImage.src = virtualBackgroundImagePath + imagesrc;
}

/**
Expand Down

0 comments on commit 5588e19

Please sign in to comment.