Author: andre
Date: 2009-09-08 17:28:15 +0200 (Tue, 08 Sep 2009)
New Revision: 38512

Modified:
   openimages/trunk/src/main/webapp/WEB-INF/tags/oip/video.tagx
   openimages/trunk/src/main/webapp/index.jspx
   openimages/trunk/src/main/webapp/style/css/player.css
   openimages/trunk/src/main/webapp/style/js/player.js
Log:
revert

Modified: openimages/trunk/src/main/webapp/WEB-INF/tags/oip/video.tagx
===================================================================
--- openimages/trunk/src/main/webapp/WEB-INF/tags/oip/video.tagx        
2009-09-08 15:27:14 UTC (rev 38511)
+++ openimages/trunk/src/main/webapp/WEB-INF/tags/oip/video.tagx        
2009-09-08 15:28:15 UTC (rev 38512)
@@ -5,10 +5,12 @@
     xmlns:jsp="http://java.sun.com/JSP/Page";
     xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
     >
-  
-  <jsp:directive.attribute name="width"  description="Width of player" />
-  <jsp:directive.attribute name="height" description="Height of player" />
-  <jsp:directive.attribute name="length" description="Length of video fragment 
in milliseconds" />
+  <jsp:directive.attribute name="width"
+          description="Width of player" />
+  <jsp:directive.attribute name="height"
+          description="Height of player" />
+  <jsp:directive.attribute name="length"
+          description="Length of video fragment in milliseconds" />
   <jsp:directive.variable name-given="embedtag" scope="AT_END" />
 
   <c:set var="w" value="${empty width ? '320' : width}" />
@@ -45,6 +47,7 @@
     </mm:listfunction>
   </mm:import>
   
+  <div id="clientcaps"><jsp:text> </jsp:text></div>
   <c:choose>
     <c:when test="${empty mediaurls}">
       <div id="vplayer" class="inavailable">
@@ -78,12 +81,21 @@
           </li>
           <li class="playerinfo">  <!-- empty --> </li>
         </ul>
+        
       </div>
     </c:otherwise>
   </c:choose>
 
-  <!-- media tag to share -->
+<!--
+  <ol>
+    <mm:listfunction name="filteredurls">
+      <li>
+        ${_.URL} type: ${_.format} av: ${_.available} s: ${_.source}
+      </li>
+    </mm:listfunction>
+  </ol>
+-->
+  <!-- videotag to share -->
   <mm:import id="embedtag"><video controls="controls"><mm:write 
referid="mediaurls" escape="none" /></video></mm:import>
-  <div id="clientcaps"><jsp:text> <!-- this waste of space is for msie plugin 
detection --> </jsp:text></div>
 
 </jsp:root>

Modified: openimages/trunk/src/main/webapp/index.jspx
===================================================================
--- openimages/trunk/src/main/webapp/index.jspx 2009-09-08 15:27:14 UTC (rev 
38511)
+++ openimages/trunk/src/main/webapp/index.jspx 2009-09-08 15:28:15 UTC (rev 
38512)
@@ -105,7 +105,7 @@
           <oip:search advanced="false" language="${_lang}" />
           <p class="logobeng">
             <fmt:message key="head.initiative" />
-            <a href="http://www.beeldengeluid.nl";><img 
src="${mm:link('/style/images/logo-beng.png')}" alt="Nederlands Instituut voor 
Beeld en Geluid" width="155" height="40" /></a>
+            <a href="http://www.beeldengeluid.nl";><img 
src="${mm:link('/style/images/logo-beng.png')}" alt="Nederlands Instituut voor 
Beeld en Geluid" width="149" height="38" /></a>
           </p>
         </div>
 

Modified: openimages/trunk/src/main/webapp/style/css/player.css
===================================================================
--- openimages/trunk/src/main/webapp/style/css/player.css       2009-09-08 
15:27:14 UTC (rev 38511)
+++ openimages/trunk/src/main/webapp/style/css/player.css       2009-09-08 
15:28:15 UTC (rev 38512)
@@ -11,41 +11,40 @@
        display: none;
 }
 
-ul.controls { width: 320px; }
+#playercontrols { width: 320px; }
 
-#oiplayer
+#vplayer
 {
+       display: block;
        width: 320px;
-       display: block;
+       height: 240px;
+       margin-bottom: 4px;
 }
 
-#oiplayer img { border: 1px solid #efefef; }
+#vplayer img { border: 1px solid #efefef; }
 
-#oiplayer div.mediaplayer
+div#playercontrols
 {
-       margin: 0;
-       padding: 0;
-}
-
-ul.controls
-{
        height: 25px;
        margin-bottom: 6px;
        margin: 10px 0;
+}
+div#playercontrols ul
+{
        height: 25px;
        list-style: none;
        display: inline;
        overflow: hidden;
 }
 
-#oiplayer.inavailable
+#vplayer.inavailable
 {
        font-weight: bold;
        font-size: 1.1em;
        background-image: url(../images/preview_video.png);
 }
 
-#oiplayer.inavailable p
+#vplayer.inavailable p
 {
        width: 80%;
        padding-top: 90px;
@@ -55,7 +54,7 @@
 }
 
 
-ul.controls li
+div#playercontrols li
 {
        margin: 0;
        padding: 0;
@@ -63,7 +62,7 @@
        display: inline;
 }
 
-ul.controls a
+div#playercontrols a
 {
        float: left;
        padding: 25px 0 0 0;
@@ -72,16 +71,16 @@
     height /**/: 25px;  /* for IE5/Win */
 }
 
-ul.controls a:hover { background-position: 0 -25px; }
+div#playercontrols a:hover { background-position: 0 -25px; }
 
-ul.controls li.play a
+div#playercontrols li#play a
 {
        background-image: url(../images/controls-play.png);
        width: 21px;
        margin-left: 0;
 }
 
-ul.controls li.play.pause a
+div#playercontrols li#play.pause a
 {
        background-image: url(../images/controls-pause.png);
        width: 21px;
@@ -98,7 +97,7 @@
 }
 */
 
-ul.controls li.position
+div#playercontrols li#position
 {
        width: 24px;
        margin: 0 0 0 10px;
@@ -106,9 +105,14 @@
        line-height: 2em;
 }
 
-div.playerinfo { font-size: xx-small; }
+div#playercontrols li.playerinfo
+{
+       margin: 0 0 0 10px;
+       font-family: Monaco, Courier, monospaced;
+       font-size: 0.5em;
+}
 
-ul.controls li.sound a
+div#playercontrols li#sound a
 {
        background-image: url(../images/controls-soundon.png);
        width: 23px;
@@ -117,7 +121,7 @@
        margin: 0 4px;
 }
 
-ul.controls li.screen a
+div#playercontrols li#screen a
 {
        background-image: url(../images/controls-fullscreen.png);
        width: 23px;

Modified: openimages/trunk/src/main/webapp/style/js/player.js
===================================================================
--- openimages/trunk/src/main/webapp/style/js/player.js 2009-09-08 15:27:14 UTC 
(rev 38511)
+++ openimages/trunk/src/main/webapp/style/js/player.js 2009-09-08 15:28:15 UTC 
(rev 38512)
@@ -51,7 +51,7 @@
             player = new Player();
         }
         //console.log("type/url: " + selectedPlayer.type + " / " + 
selectedPlayer.url);
-        player.info = selectedPlayer.type + ": " + selectedPlayer.url;
+        //player.info = "playing: " + selectedPlayer.url + " / " + 
selectedPlayer.type;
         return player.init(id, selectedPlayer.url, config);
     }
 }
@@ -66,7 +66,6 @@
         this.player = $('#' + id + ' video:first'); // help ie
     }
     this.url = url;
-    this.id = id; 
     /* if (this.urls.length == 0) this.urls[0] = $(this.player).attr('src'); */
     this.poster = $(this.player).attr('poster');
     if ($(this.player).attr('autoplay') == undefined) { // html5 can just have 
<video autoplay />
@@ -74,11 +73,6 @@
     } else {
         this.autoplay = $(this.player).attr('autoplay');
     }
-    if ($(this.player).attr('autobuffer') == undefined) {
-        this.autobuffer = false;
-    } else {
-        this.autobuffer = $(this.player).attr('autobuffer');
-    }
     this.width = $(this.player).attr('width');
     this.height = $(this.player).attr('height');
     this.state = 'init';
@@ -95,7 +89,7 @@
     this.state = 'pause';
 }
 Player.prototype.position = function() { }
-Player.prototype.info = function() { return "playing: " + this.url; }
+Player.prototype.info = function() { return "Playing: " + this.url; }
 
 function VideoPlayer() {
     this.myname = "videoplayer";
@@ -233,17 +227,15 @@
 FlowPlayer.prototype = new Player();
 FlowPlayer.prototype.init = function(id, url, config) {
     this._init(id, url, config);
+    //console.log("flash! " + url);
     this.url = url;
     var flwplayer = config.dir + "/" + config.flash;
-
-    /* flowplayer replaces everything in the geven element */
-    var el = $('#' + id).find('div.player')[0]; 
-    this.player = $f(el, { src : flwplayer, width : this.width, height : 
this.height }, {
+    this.player = $f(id, { src : flwplayer }, {
         clip: {
             url: url,
-            autoPlay: this.autoplay,
+            autoPlay: true,
             // duration: 60,
-            autoBuffering: this.autobuffer
+            autoBuffering: true
         },
         plugins: { controls: null }
     });
@@ -285,10 +277,7 @@
         probably = canPlayCortado(types, urls);
         if (probably != undefined && 
(supportMimetype('application/x-java-applet') || navigator.javaEnabled())) {
             if ($.browser.msie) {   // Argh! A browser check!
-                /* IE always reports true on navigator.javaEnabled(),
-                   that's why we need to check for the java plugin IE style. 
-                   It needs an element with id 'clientcaps' somewhere in the 
page. 
-                */
+                /* IE always reports true on navigator.javaEnabled() */
                 var javaVersionIE = 
clientcaps.getComponentVersion("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}", 
"ComponentID");
                 if (javaVersionIE) {
                     proposal.type = "msie_cortado";
@@ -303,8 +292,7 @@
     if (proposal.type == undefined) {
         var flash_url;
         for (var i = 0; i < types.length; i++) {
-            if (types[i].indexOf("video/mp4") > -1 || 
types[i].indexOf("video/flv") > -1
-                /* || types[i].indexOf("video/mpeg") > -1 */ ) {
+            if (types[i].indexOf("video/mp4") > -1 || 
types[i].indexOf("video/flv") > -1 || types[i].indexOf("video/mpeg") > -1) {
                 proposal.url = urls[i];
                 proposal.type = "flash";
             }
@@ -378,39 +366,29 @@
 }
 
 function showInfo() {
-    var text = player.info;
-    var id = player.id;
-       if ($('#' + id).find('div.playerinfo').length > 0) $('#' + 
id).find('div.playerinfo').remove();
-    $('#' + id).append('<div class="playerinfo">' + text + '</div>');
+    var text = player.info();
+    $('#playercontrols li.playerinfo').show();
+    $('#playercontrols li.playerinfo').text(text);
 }
 
 function followProgress() {
+    var oldpos;
     var pos;
-    var oldpos = -1;
     var text = "00:00";
-    var id = player.id;
+    $('li#position').text(text);
     var progress = function() {
+        //showInfo();
+        oldpos = pos;
         pos = player.position();
-        //console.log("oldpos: " + oldpos +  ", pos: " + pos)
         if (pos > 0) {
             var min = Math.floor(pos / 60);
             var sec = Math.floor(pos - (min * 60));
             text = (min < 10 ? '0' + min : min) + ":" + (sec < 10 ? '0' + sec 
: sec);
-            $('#' + id + ' ul.controls li.position').text(text);
+            $('li#position').text(text);
         }
-        
-        if (oldpos == pos) {
-            player.state = 'pause';
-            $('#' + id + ' ul.controls li.play').removeClass('pause');
-        }
-        
         if (player.state == "play") {
             setTimeout(progress, 100);
-            if (! isNaN(pos) && pos > 0) oldpos = pos;
         }
-        
     };
     progress();
-    showInfo();
-    
 }

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to