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

What is Framer? Join the Community
Return to index
Dave Marchuk
Posted Jan 13 - Read on Facebook

Is it possible to include a video within a framer prototype? I have a psd generated element and I want to have a video play within it.

I tried using an imageView and got a mime type error (which is what I was expecting, it was worth a shot though LOL).

If it's possible can someone give me some guidance on what I'd need to do to make this happen?


Koen Bok

You need to add an html5 video tag to theView.html. Something like this (untested):

var videoElement = document.createElement("video");

videoElement.src = "my-video.mp4";
videoElement.width = myLayer.width;
videoElement.height = myLayer.height;


Dave Marchuk

Thanks Koen! I'll give it a try (likely Monday) and report the results!

Dave Marchuk

The code for the video is working! Thanks so much Koen! One thing for anyone wanting to use this, the code Koen provided will make the movie start right away. If you want to delay do the following:

1. remove;
2. add videoElement.controls = true;

That will allow your user to start the video once they arrive at it.

Read the entire post on Facebook