Gius80

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Hello guys, I'm trying to use PIXI for displaying a video loaded with PIXI Loader (instead of html video tag), but I get this DOM Exception (on t.play method) this._isSourcePlaying() ? this._onPlayStart() : this.autoPlay && t.play() Here is my code (DOESN'T WORK). I see the first frame, but the video doesn't start. app.loader.add("video", "video.mp4").load((loader, resources) => { const texture = PIXI.Texture.from(resources.video.data); const sprite = new PIXI.Sprite.from(texture); sprite.width = 800; sprite.height = 600; app.stage.addChild(sprite); }); If I add the texture based on an explicit action (mouse click) or instead of using loader i add a texture form a video html element, it works. This code WORKS. Video autoplays. app.loader.add("video", "video.mp4").load((loader, resources) => { document.getElementById("play").addEventListener("click", () => { const texture = PIXI.Texture.from(resources.video.data); const sprite = new PIXI.Sprite.from(texture); sprite.width = 800; sprite.height = 600; app.stage.addChild(sprite); }); }) This code also WORKS. Video autoplays. app.loader.add("video", "video.mp4").load((loader, resources) => { const texture = PIXI.Texture.from(document.getElementById("video")); const sprite = new PIXI.Sprite.from(texture); sprite.width = 800; sprite.height = 600; app.stage.addChild(sprite); }); Any idea? I'd like to use PIXI Loader because I need to handle different assets loading. PS The video doesn't have audio. Thanks, Igor