redotvideo / revideo

Create Videos with Code
https://re.video
MIT License
2.59k stars 88 forks source link

seek() method of Video is missing. #200

Open aliveornot opened 4 months ago

aliveornot commented 4 months ago

<Video> in motion canvas has seek() method so that we can navigate through the timeline. Somehow this method is missing in revideo. Correct me if I'm wrong, but I couldn't find any other way to do this.

hkonsti commented 4 months ago

Oh, you're right. We have been optimizing the performance of the seek operation on the <Video> tag a lot which is why there are now three different seek functions with different trade-offs and speed improvements. Somewhere along those changes, it looks like we accidentally changed seek() from public to protected. Will change it back to public, release a new version, and get back to you!

aliveornot commented 4 months ago

What a quick response! That'll be great. Thank you so much!!

hkonsti commented 4 months ago

Of course! As a workaround for now, you can just delete the old <Video> tag and create a new one at the time that you want to seek to.

aliveornot commented 4 months ago

Oh I didn't know that one. I'll try that right away. Thank you!

diogeneshamilton commented 1 month ago

How would I do that? I'm trying to seek so I can start the video a second after it begins (we have issues where the video recordings start black for a second). Is this possible? I think this is the same issue, but if not, I'll make a new one.