Getting a movie to play seamlessly on my site (without controls or a frame)

Go To StackoverFlow.com

0

I want a short movie clip to play when visitors arrive at my site. I want the video area to show up without movie controls, and without any kind of border frame, so that it just looks like a moving picture. What's the best way to do that?

I'm not overly concerned with browser support. I don't want to use Flash.

Thanks.

2012-04-03 22:32
by bevanb


1

You can easily do this with the HTML5 video element and a little bit of javascript. You can embed the video into the page using:

<video id="video">
<source src="movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Just replace the src and type with your information. As for the Javascript, you can use the following:

var video = document.getElementById("video");
video.removeAttribute("controls");

This is, of course, assuming your video element's ID is "video".

2012-04-03 23:12
by connor