WNAS

Bergkamp, bergkamp

Jul 08, 2010

I really hope something like this happens this sunday...

But I really hope youtube would make it easier for me to include a frigging #html5 video and let me build me own flash fallback.... Come on people, 2001 called and it wants it's flash tags back.

large movies on iphone - a solution

Jul 07, 2010 , , , , and

Problem

I recently came across a small problem. When trying to get a movie (using the html5 video tag ofcourse) I found out that the iPhone doesn't play movies larger than 640 x 480 pixels and with a base profile other than H.264. Don't believe me, but look at their page.

As the client really wanted his rather large movie on the page and did not wanted it to be scaled down a notch, I was presented with a challenge. He also really wanted it to work on his beloved iPhone... What is a guy to do?

Solution

After some time I came up with a solution and a rather simple one it is. I use the rather excellent html5media script to get it to work in browsers without support for the video tag and want it to work in as many browsers as possible. So I already have two different sources in my video tag.

Like this:

<video
poster="pathto/poster.png"
width="780"
height="470"
controls
preload>
<source
src="pathto/movie.ogv"
type='video/ogg; codecs="theora, vorbis"'></source>
<source
src="pathto/movie.mp4"
type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'></source>
</video>

As the movie I tried to play was to big, the iPhone didn't wanted to play it. Turned out all I had to do was include a third source into the video tag, pointing to a iPhone specific file, like this:

<video
poster="pathto/poster.png"
width="780"
height="470"
controls
preload>
<source
src="pathto/movie.ogv"
type='video/ogg; codecs="theora, vorbis"'></source>
<source
src="pathto/movie.mp4"
type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'></source>
<source src="pathto/movie.m4v"
type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'></source>
</video>

Here you go, a solution to play large video's on your website, without compromising the quality for the desktop and still get it to work on the iPhone...

I hope this will help someone and if you have a better solution, please let me know...

Links

Some stuff I used to get the whole video she-bang working:

camendesign
This got me started
html5media
And this is what I use now to get it to work.

Another Nail in the Pageview Coffin

Jun 29, 2010 , and

safari_reader.jpgCool and long overdue. The sites that make me visit multiple pages for one article only make me use the reader functionality of safari.

And get annoyed...

"Think of how a typical user session works on most news sites these days. A user loads an article (1 pageview), pops open a slideshow (1 pageview), flips through 30 slides of an HTML-based slideshow (30 pageviews). That’s 32 pageviews and a lot of extraneous downloading and page refreshing.

On new msnbc.com story pages, the above sequence would register one pageview: the initial one. The rest of the interactions occur within the page itself. Can msnbc.com serve ad impressions against in-page interactions? Sure, and that’s key to the strategy, but as a user, your experience is much smoother, and as an advertiser, the impressions you purchase are almost guaranteed to come across human eyes since your ads are only loaded upon user interaction."

(Another Nail in the Pageview Coffin | Mike Industries.)

html5 video and chrome

Jun 22, 2010 and

Just found a weird feature in Google's chrome browser, version 5.0.375.70. It seems that if you put the ogg src before the mp4, it won't play...

      <video 
class="video"
poster="http://wnas.nl/files/movie/example.jpg"
width="780"
height="470"
controls preload>

<source
src="http://wnas.nl/files/movie/example.mp4"
type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</source>

<source
src="http://wnas.nl/files/movie/example.ogv"
type='video/ogg; codecs="theora, vorbis"'>
</source>
</video>

So you need to pay attention to one more thing when doing video and want it to work cross-browser...

And yes, I am aware that it won't play in IE and I don't care :). What I do care about is that the second video won't play in chrome for some reason, if anyone has a clue...

But what bothers me is that the iPhone won't play the thing if it's got a poster frame... So you need to omit that if you care about the iphone. I thought that they had that fixed with the ios4 upgrade, but apperently not...

Making an iPad HTML5 App & making it really fast

Jun 15, 2010 , , , , and

thomasfuchsNow this is really good for us real web craftsman and women. Real knowledge of your field once again proves itself against frameworks. How much I loved the demos of jQtouch at last weeks @media ( or #wdx as it is called now ), I still think that using a library or a framework isn't the thing to do for speed. So Ipad and Iphone development will create a new demand for good old hand coders.

"Don’t rely on frameworks or what standards zealots tell you. In our case, a highly trimmed HTML page, with inline CSS, just some pure JavaScript without a framework and using the capabilities of the target platform (iPad) as much as possible allows for a lean page that loads almost instantly, caches well and works great offline. Yes, we could have used JavaScript and CSS frameworks, but sometimes less is more (and remember, you don’t need all the cross-browser heavy lifting that frameworks do for you)."

(Via Thomas Fuchs.)