...All those moments will be lost in time, like tears in rain....

- soliloquy from Blade Runner

Bits and bytes do get lost, awash in the rain of data flow that is Internet. They slip away from us, never to found again... some of them will be captured here, many more will not... like tears in rain...

Thursday, November 8, 2012

HTML5 video tag

 I was looking at  HTML5 VIDEO tag and it turned out it's a mess.
  Patents and conflicting interests made this into a situation that you have to encode your video into 3 formats to be sure that will play at least in modern browsers; older browsers are even bigger mess.
  •  MP4 will work in IE, and that's pretty much only one that will work there. 
  •  Ogg/Theora is neccessary for Firefox and will work in Opera too.
  • Webm is supported by Chrome but Google can drop that format any time since they bought the company that created the format.
After you encode your movie, you have to set up IIS to recognize all 3 of those formats or you will get nice red X instead of the movie.

 Under Mime types in IIS Feature View, you need to add:
  1. extension .mp4
    type: video/mp4
  2.  extension .ogv
     type: video/ogg
  3.  extension .webm
     type: video/webm

Android needs extra help, as per http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/

<script type="text/javascript">
  var video = document.getElementById('video');

Tuesday, November 6, 2012

Ajax.ActionLink opens a new page

 This was very puzzling - all I had was a partial view - a div really with some content, and Ajax.ActionLink (in MVC3) kept opening it in new window.

 Turned out that library:


is necessary to include on the page for Ajax.ActionLink to work properly and render
partial view on the same page.