Skip to content

Commit 675d819

Browse files
committed
fix video error
1 parent 3111b53 commit 675d819

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

video/video.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,10 @@
298298
if (setVideo) {
299299
video.currentTime = audio.currentTime;
300300
}
301-
gl.bindTexture(gl.TEXTURE_2D, texture)
302-
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, video);
301+
if (video.currentTime > 0) {
302+
gl.bindTexture(gl.TEXTURE_2D, texture)
303+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, video);
304+
}
303305
}
304306

305307
m4.lookAt(eye, target, up, camera);

0 commit comments

Comments
 (0)