Author: andre
Date: 2010-03-05 13:57:41 +0100 (Fri, 05 Mar 2010)
New Revision: 41276
Modified:
openimages/trunk/src/main/webapp/oiplayer/css/oiplayer.css
openimages/trunk/src/main/webapp/oiplayer/index.html
openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js
Log:
encountered a bug when using cortado, fixed that
Modified: openimages/trunk/src/main/webapp/oiplayer/css/oiplayer.css
===================================================================
--- openimages/trunk/src/main/webapp/oiplayer/css/oiplayer.css 2010-03-05
10:25:32 UTC (rev 41275)
+++ openimages/trunk/src/main/webapp/oiplayer/css/oiplayer.css 2010-03-05
12:57:41 UTC (rev 41276)
@@ -23,10 +23,11 @@
background-color: #fff;
}
-div.oiplayer > div.player {
+div.oiplayer > div.player
+{
position: relative;
height: 240px;
- margin: 0 0 8px 0;
+ margin: 0 0 6px 0;
padding: 0;
}
Modified: openimages/trunk/src/main/webapp/oiplayer/index.html
===================================================================
--- openimages/trunk/src/main/webapp/oiplayer/index.html 2010-03-05
10:25:32 UTC (rev 41275)
+++ openimages/trunk/src/main/webapp/oiplayer/index.html 2010-03-05
12:57:41 UTC (rev 41276)
@@ -18,10 +18,8 @@
<div id="clientcaps"> </div> <!-- div#clientcaps is needed for Java
detection in MSIE -->
<video controls="controls"
poster="http://www.openimages.eu/images/18489/WEEKNUMMER364-HRE0000D9C6.png">
-<!--
<source type="video/ogg; codecs=theora"
src="http://www.openimages.eu/files/09/9734.9730.WEEKNUMMER364-HRE0000D9C6.ogv">
</source>
<source type="video/ogg; codecs=theora"
src="http://www.openimages.eu/files/09/9737.9730.WEEKNUMMER364-HRE0000D9C6.ogv">
</source>
- -->
<source type="video/mp4; codecs=unknown"
src="http://www.openimages.eu/files/09/9740.9730.WEEKNUMMER364-HRE0000D9C6.mp4">
</source>
</video>
Modified: openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js
===================================================================
--- openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js
2010-03-05 10:25:32 UTC (rev 41275)
+++ openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js
2010-03-05 12:57:41 UTC (rev 41276)
@@ -48,9 +48,8 @@
$(mt).wrap('<div class="oiplayer"><div
class="player"></div></div>');
var div = $(mt).closest('div.oiplayer');
-
var player = createPlayer(mt, sources, config);
- $(div).find('div.player').hide(); // .remove() would indefinitely
loop MSIE
+ $(div).find('div.player').hide();
var poster = createPoster(self, player); // using self (complete
input) for MSIE
$(div).prepend(poster);
@@ -68,6 +67,11 @@
$(div).find('img.oipreview').css("z-index", "1");
}
$(div).find('div.player').show();
+ var info = player.info;
+ if (info.indexOf("flash") < 0) {
+ $(div).find('div.player').empty();
+ }
+ $(div).find('div.player').append(player.player);
$(player.player).css("z-index", "9");
player.play();
if (config.controls == true) {
@@ -101,6 +105,12 @@
$(div).find('img.oipreview').remove();
}
$(div).find('div.player').show();
+ var info = player.info;
+ if (info.indexOf("flash") < 0) {
+ $(div).find('div.player').empty();
+ }
+ $(div).find('div.player').append(player.player);
+ $(player.player).css("z-index", "9");
player.play();
if ($(ctrls).find('li.pause').length == 0) {
$(ctrls).find('li.play').addClass('pause');
@@ -153,9 +163,6 @@
} else {
player = new Player();
}
- player.type = el.tagName.toLowerCase();
- player.player = el;
- player.url = selectedPlayer.url;
player.info = selectedPlayer.type + ":" + selectedPlayer.url;
player.init(el, selectedPlayer.url, config);
return player;
@@ -363,7 +370,9 @@
Player.prototype.info = function() { }
Player.prototype._init = function(el, url, config) {
+ this.player = el;
this.url = url;
+ this.type = el.tagName.toLowerCase(); // video or audio
this.poster = $(this.player).attr('poster');
//console.log("this.poster: " + this.poster);
this.autoplay = $(this.player).attr('autoplay');
@@ -389,8 +398,7 @@
this._init(el, url, config); // just init and pass it along
this.url = url;
var self = this;
- //console.log(this.player);
- var timer = $(el).find('ul.controls li.position');
+ var timer = $(el).next('ul.controls li.position');
this.player.addEventListener("playing",
function(ev) {
self.state = 'play';
@@ -559,10 +567,6 @@
var duration = (this.duration == undefined ? 0 :
Math.round(this.duration));
var div = document.createElement('div'); // TODO: add (random) id: adding
flowplayer and returning it impossible without id
- /*
- $(el).closest('div.player').html(div);
- $(div).addClass('oiplayer-flash');
- */
$(el).closest('div.oiplayer').html(div);
$(div).addClass('player');
this.player = $f(div, { src : flwplayer, width : this.width, height :
this.height }, {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs