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
- Fix blank screen on multires video demo on Chrome. This implements the workaround described in: https://github.com/pixijs/pixi.js/issues/5996 for the Chrome issue reported at: https://bugs.chromium.... — committed to google/marzipano by tjgq 4 years ago
- Fix black screen before play btn clicked This seems necessary to allow using video as a texture. See: https://bugs.chromium.org/p/chromium/issues/detail?id=898550 https://github.com/pixijs/pixi.js/is... — committed to ZoomZhao/VideoContext by deleted user 3 years ago
Just for information, I had the same problem and I solved it adding
video.preload = 'auto'andvideo.autoload = truewhere video isconst video = document.createElement('video')@drpepper @nicholas-slepchenko @borradaniele This is problem only with Chrome 76 and later. Temporary fix: https://www.pixiplayground.com/#/edit/F1nTXxdf9xfBQt6uTurAM
@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:
also see: #6023