fix(virtual-background) fix tainted canvas when using the CDN

When we use a CDN the images come from an origin different than the site so
unless we mark them for CORS the canvas where they are painted will be tainted.

Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image
This commit is contained in:
Saúl Ibarra Corretgé 2021-03-17 16:10:37 +01:00 committed by Saúl Ibarra Corretgé
parent d080460f9b
commit 1395f84550
1 changed files with 1 additions and 0 deletions

View File

@ -43,6 +43,7 @@ export default class JitsiStreamBackgroundEffect {
if (this._options.virtualBackground.isVirtualBackground) {
this._virtualImage = document.createElement('img');
this._virtualImage.crossOrigin = 'anonymous';
this._virtualImage.src = this._options.virtualBackground.virtualSource;
}
this._model = model;