Sfoglia il codice sorgente

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
j8
Saúl Ibarra Corretgé 4 anni fa
parent
commit
1395f84550

+ 1
- 0
react/features/stream-effects/virtual-background/JitsiStreamBackgroundEffect.js Vedi File

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

Loading…
Annulla
Salva