瀏覽代碼

Source: Guard reference to `VideoFrame`. (#32301)

Michael Herzog 1 月之前
父節點
當前提交
2df1da2067
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/textures/Source.js

+ 1 - 1
src/textures/Source.js

@@ -88,7 +88,7 @@ class Source {
 
 			target.set( data.videoWidth, data.videoHeight, 0 );
 
-		} else if ( data instanceof VideoFrame ) {
+		} else if ( ( typeof VideoFrame !== 'undefined' ) && ( data instanceof VideoFrame ) ) {
 
 			target.set( data.displayHeight, data.displayWidth, 0 );
 

粤ICP备19079148号