pixijs: Videos not working anymore on Chrome v76

Videos are not working anymore just after updating Google Chrome to v76. Loading the video (with the app loader) and creating a Sprite using the video as texture does not work anymore. Nothing has been changed in the site source code, I’ve only updated Chrome. Tested the same site from the same local development server on an older version of Chrome and everything is fine. The error in console is the following

WebGL: INVALID_VALUE: tex(Sub)Image2D: video visible size is empty
[.WebGL-0x7f861a496800]GL ERROR :GL_INVALID_OPERATION : glTexSubImage2D: level 0 does not exist

Steps to Reproduce

I get the same error on the PIXI official site in the video demo page. And the video is not playing even there. https://pixijs.io/examples/#/sprite/video.js

Environment

Mac OS High Sierra 10.13.6 Chrome Version 76.0.3809.87 (Official Build) (64-bit) PIXI v5.1.1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 20 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Just for information, I had the same problem and I solved it adding video.preload = 'auto' and video.autoload = true where video is const video = document.createElement('video')

Could you try the latest dev version please? #6088 might have helped this

@themoonrat Confirmed video file issue with Chrome and Opera resolved after upgrading to PixiJS 5.1.5. Many thanks!

@dghez It works,thank you !

@drpepper @borradaniele

Try this:

const video =  document.createElement('video')
video.crossOrigin = 'anonymous'
video.preload = ''
video.src = 'VIDEO_URL'
const sprite = Sprite.from(video)
app.stage.addChild(sprite)

also see: #6023