Jump to content

How to get video duration in PIXI (PIXI.VideoBaseTexture))


Recommended Posts

Thanks for the reply. I could not able to load video element on canvas. I am using below code.

<div ref="imageSlide">
var video = document.createElement("video");
video.id = "videoPixi";
video.src = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4";
var video = document.querySelector("#videoPixi");
var basetx = new PIXI.BaseTexture.from(video);
this.videoTexture = PIXI.Texture.from(basetx);//(this.screenData.background.video.currentUrl);
var videoSprite = new PIXI.Sprite(this.videoTexture);
videoSprite.width = videoWidth;
videoSprite.height = videoHeight;
I am getting an error as it is showing in the attachments


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...