소스 검색

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
master
Saúl Ibarra Corretgé 4 년 전
부모
커밋
1395f84550
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      react/features/stream-effects/virtual-background/JitsiStreamBackgroundEffect.js

+ 1
- 0
react/features/stream-effects/virtual-background/JitsiStreamBackgroundEffect.js 파일 보기

@@ -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…
취소
저장