Android

warning: Creating default object from empty value in /mnt/data/accounts/m/mirousek/data/www/eu/mirousek/www/modules/taxonomy/taxonomy.pages.inc on line 33.

Inline video in Android browsers

HTML:

<video id="video" autobuffer height="240" width="360">
<source src="BigBuck.m4v">
<source src="BigBuck.webm" type="video/webm">
<source src="BigBuck.theora.ogv" type="video/ogg">
</video>

JavaScript:

<script>
  function init() {
    enableVideoClicks();
  }

  function enableVideoClicks() {
    var videos = document.getElementsByTagName('video') || [];
    for (var i = 0; i < videos.length; i++) {
      // TODO: use attachEvent in IE
      videos[i].addEventListener('click', function(videoNode) {
        ret
Keywords: Android, JavaScript
Syndicate content