Skip to content

Commit 3109c47

Browse files
authored
[FIX] Correctly set texture dimensions from video source (#7200)
1 parent 2b4fdec commit 3109c47

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/platform/graphics/texture.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -955,8 +955,13 @@ class Texture {
955955
this._levelsUpdated[mipLevel] = true;
956956
}
957957

958-
width = source.width;
959-
height = source.height;
958+
if (source instanceof HTMLVideoElement) {
959+
width = source.videoWidth;
960+
height = source.videoHeight;
961+
} else {
962+
width = source.width;
963+
height = source.height;
964+
}
960965
}
961966
}
962967

0 commit comments

Comments
 (0)