This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Yacine Baroudi
Posted Dec 27 - Read on Facebook

Merry Christmas Framsters!
I'm trying to implement on a video, 2 +/- 10 seconds RW and FF buttons. Being new to coding, the issue will likely be evident but I can't figure it out. Everything else works perfect except for those 2 buttons. Could anyone please tell me what I'm doing wrong in the code below. Thanks!
Prototype code is here for reference: https://framer.cloud/rkYVMKhVg/

8 Comments

Jordan Robert Dobson

Are you sure you can set current time?

I think you have to use a seek function if I recall correctly.

Jordan Robert Dobson

What documentation are you using for the HTML5 video element?

Yacine Baroudi

I'm using this module https://github.com/stakes/Framer-VideoPlayer and whatever was utilized in the original code and functions used above the buttons

Yacine Baroudi

Couldn't find an example of a seek function and thought I'd try an approach with scrubber; I.e. instead of dragging it and updating it's relative position on the timeline, tell it to just jump back or forward from whatever position it happens to be at when a click event fires
Thanks

Jordan Robert Dobson

Ah okay. Why not just use the navtive Framer video player?

Yacine Baroudi

Tried that too but not joy getting that quick rewind to work

Yacine Baroudi

Found the fix for anyone looking, to set a 10 second rewind on a button use the fastSeek and currentTime

sketch.QuickRewind.on Events.Tap, (event) ->
______videoLayer.player.fastSeek(videoLayer.player.currentTime - 10)
______videoLayer.player.play()

Yacine Baroudi

If anyone wonders about a similar browser error issue, it seems to be Chrome specific. All works well on Safari.

Read the entire post on Facebook