<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>iGlauser &#187; video</title> <atom:link href="http://iglauser.com/tag/video/feed/" rel="self" type="application/rss+xml" /><link>http://iglauser.com</link> <description>Enhancing the Web</description> <lastBuildDate>Wed, 09 Jun 2010 09:53:08 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>HTML5 Video Instead of Flash Splash Screen</title><link>http://iglauser.com/2010/05/html5-video-instead-of-flash-splash-screen/</link> <comments>http://iglauser.com/2010/05/html5-video-instead-of-flash-splash-screen/#comments</comments> <pubDate>Tue, 18 May 2010 21:11:58 +0000</pubDate> <dc:creator>Ivan</dc:creator> <category><![CDATA[HTML5]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[fallback]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[splash screen]]></category> <category><![CDATA[video]]></category><guid isPermaLink="false">http://iglauser.com/?p=476</guid> <description><![CDATA[I had a client that absolutely wanted a Flash splash screen on his site. What I normally do is try to explain all the drawbacks of such a solution and try to convince them not to use a Flash splash screen and instead put a movie in the content of the first page so that [...]]]></description> <content:encoded><![CDATA[<p>I had a client that absolutely wanted a Flash splash screen on his site. What I normally do is try to explain all the drawbacks of such a solution and try to convince them not to use a Flash splash screen and instead put a movie in the content of the first page so that the visitor still easily can see and navigate to other parts of the site without having to get irritated on an annoying Flash movie. If you do not know what I mean when I refer to annoying splash screen movie you can just search the web for the words <a href="http://www.google.com/search?q=Flash+splash+screen+pros+cons">Flash and splash screen</a> and you will find many articles on the subject.</p><p>As I sat down and analyzed the problem I played with the thought of creating a HTML5 based splash screen without having to use Flash. I wanted the movie to automatically play in full screen. I also wanted the user to easily continue on to the main page by clicking anywhere inside the browser presentation area. Since I am a big fan of Wordpress I also wanted to see if there was an easy way to implement this solution on a Wordpress site.</p><p>I started of searching the web for HTML5 video solutions with Flash fallbacks and found <a href="http://camendesign.com/code/video_for_everybody">this site</a>. I followed the example there and tested it out in different browsers on Windows. It showed that all but IE8 and Safari worked fine. Safari (v. 4.0.5) played the movie extremely slow for some reason and IE8 showed the Flash movie instead since it do not support HTML5 video tags.</p><p>I experimented a little and combined the <a href="http://wordpress.org/extend/plugins/splashscreen/">splashscreen plugin</a> for Wordpress, some HTML5 from the<a href="http://camendesign.com/code/video_for_everybody"> video for everybody </a>example and some Javascript for <a href="http://diveintohtml5.org/detect.html">detecting if the browser support HTML5</a>.</p><pre class="brush: xml;">

&lt;body bgcolor=&quot;#000000&quot;&gt;

&lt;a onclick=&quot;setsplash()&quot; href=&quot;&quot;&gt;

&lt;video width=&quot;100%&quot; height=&quot;100%&quot; autobuffer autoplay loop style=&quot;position: absolute; top: 0px; left: 0px;&quot;&gt;

&lt;source src=&quot;/media/myvideo.mp4&quot; type=&quot;video/mp4&quot;&gt;&lt;/source&gt;
&lt;source src=&quot;/media/myvideo.ogg&quot; type=&quot;video/ogg&quot;&gt;&lt;/source&gt;

 &lt;script type=&quot;text/javascript&quot;&gt;
 function supports_video() {
 return !!document.createElement('video').canPlayType;
 }
 &lt;/script&gt;

 &lt;script type=&quot;text/javascript&quot;&gt;
 if (!supports_video()) { setsplash(); window.location.reload(); }
 &lt;/script&gt;

&lt;/video&gt;

&lt;/a&gt;

&lt;/body&gt;
</pre><p>The video tag has its width and height set to 100% to fill the browser screen. The in-line style is not what I recommend but added there just for laziness and to reduce the code in this post. It should be put in a CSS style sheet.</p><p>Note that this solution is not something that I recommend since I generally is against splash screens.</p> ]]></content:encoded> <wfw:commentRss>http://iglauser.com/2010/05/html5-video-instead-of-flash-splash-screen/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 6/11 queries in 0.068 seconds using disk

Served from: iglauser.com @ 2012-05-21 00:13:57 -->
