[xiph-commits] r15717 - websites/celt-codec.org/presentations

gmaxwell at svn.xiph.org gmaxwell at svn.xiph.org
Tue Feb 24 13:57:45 PST 2009


Author: gmaxwell
Date: 2009-02-24 13:57:45 -0800 (Tue, 24 Feb 2009)
New Revision: 15717

Modified:
   websites/celt-codec.org/presentations/index.shtml.en
   websites/celt-codec.org/presentations/video.js
Log:
Firefox3.1 autoplay bug; HTML validation.

Modified: websites/celt-codec.org/presentations/index.shtml.en
===================================================================
--- websites/celt-codec.org/presentations/index.shtml.en	2009-02-24 20:05:09 UTC (rev 15716)
+++ websites/celt-codec.org/presentations/index.shtml.en	2009-02-24 21:57:45 UTC (rev 15717)
@@ -21,13 +21,12 @@
 <!--  All your page content goes here  -->
 <h1>Presentations</h1>
 <h2><a href="http://linux.conf.au/">linux.conf.au</a> 2009 &mdash; Timothy B. Terriberry</h2>
-  <table width=384 border=0><tr><td><video id="lcaceltvideo" width=384 height=288
-   poster="LCA-video-thumb.jpg" controls="true" autoplay="false" duration="3855"
-   src="http://people.xiph.org/~greg/video/linux_conf_au_CELT.ogv"/></td></tr><tr><td align="left"><a
-   href="http://people.xiph.org/~greg/video/linux_conf_au_CELT.ogv">Download
-   video</a>
-   <small>(Ogg/<a href="http://www.theora.org/">Theora</a>; 64 minutes; 81 MiB)</small></a><br/><a href="misc/lca-celt-audio.tar">Audio samples</a> <small>(tar/flac; 3.4 MiB)</small><br/><a href="misc/lca-celt.pdf">Slides</a> <small>(PDF; 2.3 MiB)</small></td></tr></table>
+  <table width="384" border="0"><tr><td><video id="lcaceltvideo" width="384" height="288"
+   poster="LCA-video-thumb.jpg" controls duration="3855"
+   src="http://people.xiph.org/~greg/video/linux_conf_au_CELT.ogv"/></td></tr><tr>
+   <td align="left"><a href="http://people.xiph.org/~greg/video/linux_conf_au_CELT.ogv">Download video</a> <small>(Ogg/<a href="http://www.theora.org/">Theora</a>; 64 minutes; 81 MiB)</small><br/>
+   <a href="misc/lca-celt-audio.tar">Audio samples</a> <small>(tar/flac; 3.4 MiB)</small><br/>
+   <a href="misc/lca-celt.pdf">Slides</a> <small>(PDF; 2.3 MiB)</small></td></tr></table>
 
 
-
 <!--#include virtual="/ssi/pagebottom.include" -->

Modified: websites/celt-codec.org/presentations/video.js
===================================================================
--- websites/celt-codec.org/presentations/video.js	2009-02-24 20:05:09 UTC (rev 15716)
+++ websites/celt-codec.org/presentations/video.js	2009-02-24 21:57:45 UTC (rev 15717)
@@ -10,8 +10,9 @@
 
     var video = document.createElement("video");
 
-    if ((video.canPlayType && video.canPlayType("video/ogg;codecs=\"theora,vorbis\"") ==
-	"probably") || (!video.canPlayType && video.play)) {
+    if ((video.canPlayType
+	 && video.canPlayType("video/ogg;codecs=\"theora,vorbis\"") ==
+	 "probably") || (!video.canPlayType && video.play)) {
 	videoElement = true;
     }
 
@@ -28,12 +29,12 @@
 		if (navigator.mimeTypes[i].type.indexOf("video/ogg") > -1) {
 		    oggPlugin = true;
 		}
-		if (navigator.mimeTypes[i].type.
-		    indexOf("application/x-vlc-plugin") > -1) {
+		if (navigator.mimeTypes[i].
+		    type.indexOf("application/x-vlc-plugin") > -1) {
 		    vlcPlugin = true;
 		}
-		if (navigator.mimeTypes[i].type.
-		    indexOf("application/x-java-applet") > -1) {
+		if (navigator.mimeTypes[i].
+		    type.indexOf("application/x-java-applet") > -1) {
 		    foundJavaMimeType = true;
 		}
 	    }
@@ -45,7 +46,8 @@
 	} else {
 	    javaEnabled = navigator.javaEnabled();
 	}
-	var inlinePlayback = vlcActiveX || vlcPlugin || oggPlugin || javaEnabled;
+	var inlinePlayback = vlcActiveX || vlcPlugin || oggPlugin
+	    || javaEnabled;
 
 	var videos = document.getElementsByTagName("video");
 
@@ -62,18 +64,24 @@
 	    var autoplay = video.getAttribute("autoplay");
 	    var duration = video.getAttribute("duration");
 	    var id = video.getAttribute("id");
-	    if ((autoplay != "true") || (!inlinePlayback))
-		autoplay = "false";
-	    if (controls != "true")
+
+	    if (controls!=null)
+		controls = "true";
+	    else
 		controls = "false";
 
+	    if ((autoplay==null) || !inlinePlayback)
+		autoplay = "false";
+	    else if (autoplay!=null)
+		autoplay = "true";
+
 	    if (autoplay == "false") {
 		autoplay = "true";
 		var posterid = id + "_poster_" + i;
 		var jsexec = "swapVideo(document.getElementById('"
 		    + posterid + "'),'" + src + "','" +
 		    width + "','" + height + "','" +
-		    controls + "','" + duration + "','" +autoplay+
+		    controls + "','" + duration + "','" + autoplay +
 		    "','" + javaEnabled + "','" +
 		    oggPlugin + "','" + vlcActiveX + "','" + vlcPlugin +
 		    "');";
@@ -128,7 +136,8 @@
 
 	    } else {
 		swapVideo(video, src, width, height, controls, duration,
-			  autoplay,javaEnabled, oggPlugin, vlcActiveX, vlcPlugin);
+			  autoplay, javaEnabled, oggPlugin, vlcActiveX,
+			  vlcPlugin);
 	    }
 	}
     }



More information about the commits mailing list