Author: michiel
Date: 2009-06-25 13:45:51 +0200 (Thu, 25 Jun 2009)
New Revision: 36406
Modified:
openimages/trunk/src/main/webapp/style/js/player.js
Log:
simplified even more
Modified: openimages/trunk/src/main/webapp/style/js/player.js
===================================================================
--- openimages/trunk/src/main/webapp/style/js/player.js 2009-06-25 11:43:49 UTC
(rev 36405)
+++ openimages/trunk/src/main/webapp/style/js/player.js 2009-06-25 11:45:51 UTC
(rev 36406)
@@ -284,24 +284,28 @@
*/
//console.log(el.canPlayType( types[i] ));
if (el.canPlayType( types[i] ) == "probably") {
- probably = urls[i];
- break; // this is the best we can do
+ return urls[i]; // this is the best we can do
+
//console.log("found one: " + probably);
}
if (el.canPlayType( types[i] ) == "maybe") {
probably = urls[i]; // if we find nothing better
}
}
+ if (probably != undefined) {
+ return probably;
+ }
- if (types.length == 0) {
- //console.log("No source elements found");
- var url = $(video).attr('src');
- if (this_url != undefined &&
- (this_url.lastIndexOf('.mp4') > -1 ||
this_url.lastIndexOf('.h264') > -1
- )) {
- //probably = "video/mp4";
- probably = url;
- }
+ //console.log("No source elements found");
+
+ // last fall back, the 'src' attribute itself.
+
+ var url = $(video).attr('src');
+ if (this_url != undefined &&
+ (this_url.lastIndexOf('.mp4') > -1 ||
this_url.lastIndexOf('.h264') > -1
+ )) {
+ //probably = "video/mp4";
+ probably = url;
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs