Is there any way to set a full screen video background for a web page without using Flash?
I was considering html5 but I cannot leave Internet Explorer out.
Any ideas?
Thanks a lot
Is there any way to set a full screen video background for a web page without using Flash?
I was considering html5 but I cannot leave Internet Explorer out.
Any ideas?
Thanks a lot
It is not possible without installing additional add ons or objects with internet explorer. HTML5
allows to embed videos in your website, but not all browser provide full-screen support for that. Maybe is to use Google's Chrome Frame an idea.
Have a look at the HTML5
specification:
User agents may allow users to view the video content in manners more suitable to the user (e.g. full-screen or in an independent resizable window). As for the other user interface features, controls to enable this should not interfere with the page's normal rendering unless the user agent is exposing a user interface. In such an independent context, however, user agents may make full user interfaces visible, with, e.g., play, pause, seeking, and volume controls, even if the controls attribute is absent.
It is also possible to embed Microsoft's Windows Media Player, but not in background... Here a working example: http://www.html5-fullscreen-video.com/
I think that you need to first establish why you are not keen on using Flash. If the reason is that you want to target mobile devices, then using HTML5's <video>
in combination with a Flash player fall back is definitely viable.
Unfortunately HTML5 is not fully supported in every browser - especially IE. This is probably why you will still need to use Flash at some point.
So assuming that you would like to give the "HTML5's <video>
+ Flash fallback" method a shot for your full screen background video, here's what you could probably do:
HTML:
<video id="bg-vid" autoplay controls>
<source src="video.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="video.ogv" type='video/ogg; codecs="theora, vorbis"' />
<source src="video.mp4" />
<object id="flash-vid" type="application/x-shockwave-flash"
data="flowplayer-3.2.1.swf">
<param name="movie" value="flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"clip": {"url": "http://yoursite.com/videos/video.mp4", "autoPlay":true}}' />
</object>
</video>
And then you style it like this for a full screen effect and proportional cropping/stretching:
#bg-vid, #flash-vid{
min-height: 100%;
min-width: 1024px;
width: 100%;
height: auto;
position: fixed;
top: 0;
left: 0;
z-index: -1;
}
Is there any way to set a full screen video background for a web page without using Flash?
If you mean true fullscreen - occupying the whole, physical screen - nope. No modern browser allows this in pure HTML.
Well you COULD do a sprite animation if it's just a short animation/video but i'm pretty sure the performance wouldn't be satisfactory. not to mention the image size
If you need to support IE versions 8 and earlier, and want to avoid Flash, then you could build a video player in Silverlight, concerning HTML5, as the other people mention, it does not allow full screen playback, the best it offers it full window playback.
Hope that helps, but I imagine that if you're trying to avoid Flash then you're actually avoiding using plugins.
Seems you can. See this question. And check out the VideoBG jQuery plugin. Rather laggy, and not great browser support, but it does work :)