Jump to content

video onended goto beginning


Willem
 Share

Recommended Posts

from this playground file
https://www.babylonjs-playground.com/#W2DP7F#3
i managed to add 'click to play' poster frame

and made a toggle bit:
scene.onPointerUp = function() {
        if (videoTexture.video.paused === true){
        videoTexture.video.play();
        } else {
        videoTexture.video.pause();    
        }

but now i wonder how to add the eventListener("onended") and set currentTime to 0 again AND show the posterFrame.
Any ideas?

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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