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

What is Framer? Join the Community
Return to index
Richard Burton
Posted Aug 08 - Read on Facebook

Is there a property for a video’s length? I couldn’t find anything at: http://framerjs.com/docs/#videolayer.videolayer

Also, is there a good way to dig into things like this in the source?

1 Comments

Joshua Tucker

Hey Richard!

The VideoLayer's .player property (used for things like .play or fastSeek (as shown in Framer Docs)), is an HTMLVideoElement. Therefore, you can use the HTML Audio/Video reference to view the properties you can use. In the case of duration, that would be layer.player.duration.

http://www.w3schools.com/tags/ref_av_dom.asp

I started by checking Framer's source on GitHub (specifically VideoLayer: https://github.com/koenbok/Framer/blob/master/framer/VideoLayer.coffee). Once I found that the layer create's an HTML Video element, and adds it to @player, I hit the internet to look for options.

Cheers!

Read the entire post on Facebook