Author: andre
Date: 2010-04-01 14:17:18 +0200 (Thu, 01 Apr 2010)
New Revision: 41721
Modified:
openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js
Log:
fix to make this work with jquery 1.4 and jquery ui 1.8, plus trying to make
slider more fluently
Modified: openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js
===================================================================
--- openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js
2010-04-01 12:01:22 UTC (rev 41720)
+++ openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js
2010-04-01 12:17:18 UTC (rev 41721)
@@ -132,7 +132,7 @@
if (pl.duration) { // else no use
$(ctrls).find("div.slider > div").slider({
- animate: 'fast',
+ animate: true,
range: 'min',
value: (pl.start ? pl.start : 0),
max: Math.round(pl.duration)
@@ -141,7 +141,7 @@
pos(pl, ui.value);
});
$(ctrls).find("div.slider > div").bind('slidechange',
function(ev, ui) {
- if (ev.originalEvent.type == "mouseup") {
+ if (ev.originalEvent != undefined &&
ev.originalEvent.type == "mouseup") {
pos(pl, ui.value);
}
});
@@ -472,17 +472,17 @@
pos = player.position();
sec = Math.floor(pos);
//console.log("n: " + now + ", s: " + sec + ", pos: " + pos);
- if (!isNaN(pos) && pos > 0 && sec != now) {
+ if (!isNaN(pos) && pos > 0 && pos != now) {
$(ctrls).find('li.position').text( $.oiplayer.totime(pos)
);
- $(ctrls).find('div.slider > div').slider('option',
'value', sec);
+ $(ctrls).find('div.slider > div').slider('option',
'value', pos);
$(ctrls).find('li.slider').addClass('changed');
i = 0;
- now = sec;
+ now = pos;
}
if (pos < 1) {
$(ctrls).find('li.slider').removeClass('changed'); }
- if (now == sec) { i++; }
- if (i > 10) {
- //console.log("stopping... " + i);
+ if (now == pos) { i++; }
+ if (i > 9) {
+ //console.log("stopped after " + (i * 0.2) + " seconds.");
player.pause(); // maybe stop?
clearInterval(progress);
return;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs