Arreglado fallo en VideoSlider (no salta el evento al terminar la reproducción)
git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@72 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
parent
6269732080
commit
c4a93e71d8
@ -1 +1 @@
|
||||
(function(c){c.playlistManager=function(e){var d=new b(e);return d};function b(d){this._loopingOn=d.loopingOn;this._randomPlay=d.randomPlay;this._playlistItems;this._lastInOrder=false;this._counter=-1;this._lastPlayedFromPlaylistClick;this._lastRandomCounter;this._randomPaused=false;this._traceCounter=true;this._randomArr=[];this._playlistSelect=false}b.prototype={setCounter:function(d,e){if(typeof e=="undefined"){e=true}if(e){this._counter+=parseInt(d,10)}else{this._counter=parseInt(d,10)}this._checkCounter()},getCounter:function(){var d;if(this._randomPlay){if(!this._playlistSelect){d=this._randomArr[this._counter]}else{d=this._counter}}else{d=this._counter}return d},advanceHandler:function(d){this._playlistSelect=false;if(this._randomPaused){this._handleRandomPaused(d)}else{this.setCounter(d)}},processPlaylistRequest:function(d){this._playlistSelect=false;if(this._randomPlay){this._playlistSelect=true;this._lastPlayedFromPlaylistClick=d;if(!this._randomPaused){this._lastRandomCounter=this._counter;this._randomPaused=true}}this.setCounter(d,false)},getLastInOrder:function(){return this._lastInOrder},getRandomPaused:function(){return this._randomPaused},setPlaylistItems:function(d){this._counter=-1;this._playlistItems=d;if(this._randomPlay){this._makeRandomList()}},reSetCounter:function(){this._counter=-1},setRandom:function(d){this._randomPlay=d;if(this._randomPlay){this._makeRandomList()}this._randomChange()},setLooping:function(d){this._loopingOn=d},setTraceCounter:function(d){this._traceCounter=d},_handleRandomPaused:function(){var d=c(this);this._randomPaused=false;if(this._lastRandomCounter+a>this._playlistItems-1){this._counter=this._playlistItems-1;d.trigger("ap_PlaylistManager.COUNTER_READY");return}else{if(this._lastRandomCounter+a<0){this._counter=0;d.trigger("ap_PlaylistManager.COUNTER_READY");return}}this.setCounter(this._lastRandomCounter+a,false)},_randomChange:function(){if(this._randomPlay){this._activeIndexFirst();this._counter=0}else{if(this._randomPaused){this._counter=this._lastPlayedFromPlaylistClick;this._randomPaused=false}else{this._counter=this._randomArr[this._counter]}}},_checkCounter:function(){var d=c(this);this._lastInOrder=false;if(this._loopingOn){if(this._randomPlay){if(this._counter>this._playlistItems-1){this._counter=this._randomArr[this._playlistItems-1];this._makeRandomList();this._firstIndexCheck();this._counter=0}else{if(this._counter<0){this._counter=this._randomArr[0];this._makeRandomList();this._lastIndexCheck();this._counter=this._playlistItems-1}}}else{if(this._counter>this._playlistItems-1){this._counter=0}else{if(this._counter<0){this._counter=this._playlistItems-1}}}d.trigger("ap_PlaylistManager.COUNTER_READY")}else{if(this._counter>this._playlistItems-1){this._counter=0;this._lastInOrder=true}else{if(this._counter<0){this._counter=this._playlistItems-1;this._lastInOrder=false}}if(this._lastInOrder){d.trigger("ap_PlaylistManager.PLAYLIST_END")}else{d.trigger("ap_PlaylistManager.COUNTER_READY")}}},_makeRandomList:function(){if(this._playlistItems<3){return}this._randomArr=this._randomiseIndex(this._playlistItems)},_firstIndexCheck:function(){if(this._randomArr[0]==this._counter){var d=this._randomArr.splice(0,1);this._randomArr.push(d)}},_lastIndexCheck:function(){if(this._randomArr[this._playlistItems-1]==this._counter){var d=this._randomArr.splice(this._playlistItems-1,1);this._randomArr.unshift(d)}},_activeIndexFirst:function(){var f=0;var d=this._randomArr.length;for(f;f<d;f++){if(this._randomArr[f]==this._counter){if(f==0){break}var e=this._randomArr.splice(f,1);this._randomArr.unshift(e);break}}},_randomiseIndex:function(g){var e=[];var k=[];var h=0;for(h;h<g;h++){e[h]=h}var f=0,d;for(f;f<g;f++){d=Math.round(Math.random()*(e.length-1));k[f]=e[d];e.splice(d,1)}return k}}})(jQuery);
|
||||
(function(b){function c(a){this._loopingOn=a.loopingOn;this._randomPlay=a.randomPlay;this._playlistItems;this._lastInOrder=false;this._counter=-1;this._lastPlayedFromPlaylistClick;this._lastRandomCounter;this._randomPaused=false;this._traceCounter=true;this._randomArr=[];this._playlistSelect=false}b.playlistManager=function(a){var b=new c(a);return b};c.prototype={setCounter:function(a,b){if(typeof b=="undefined")b=true;if(b){this._counter+=parseInt(a,10)}else{this._counter=parseInt(a,10)}this._checkCounter()},getCounter:function(){var a;if(this._randomPlay){if(!this._playlistSelect){a=this._randomArr[this._counter]}else{a=this._counter}}else{a=this._counter}return a},advanceHandler:function(a){this._playlistSelect=false;if(this._randomPaused){this._handleRandomPaused(a)}else{this.setCounter(a)}},processPlaylistRequest:function(a){this._playlistSelect=false;if(this._randomPlay){this._playlistSelect=true;this._lastPlayedFromPlaylistClick=a;if(!this._randomPaused){this._lastRandomCounter=this._counter;this._randomPaused=true}}this.setCounter(a,false)},getLastInOrder:function(){return this._lastInOrder},getRandomPaused:function(){return this._randomPaused},setPlaylistItems:function(a){this._counter=-1;this._playlistItems=a;if(this._randomPlay)this._makeRandomList()},reSetCounter:function(){this._counter=-1},setRandom:function(a){this._randomPlay=a;if(this._randomPlay)this._makeRandomList();this._randomChange()},setLooping:function(a){this._loopingOn=a},setTraceCounter:function(a){this._traceCounter=a},_handleRandomPaused:function(){var c=b(this);this._randomPaused=false;if(this._lastRandomCounter+a>this._playlistItems-1){this._counter=this._playlistItems-1;c.trigger("ap_PlaylistManager.COUNTER_READY");return}else if(this._lastRandomCounter+a<0){this._counter=0;c.trigger("ap_PlaylistManager.COUNTER_READY");return}this.setCounter(this._lastRandomCounter+a,false)},_randomChange:function(){if(this._randomPlay){this._activeIndexFirst();this._counter=0}else{if(this._randomPaused){this._counter=this._lastPlayedFromPlaylistClick;this._randomPaused=false}else{this._counter=this._randomArr[this._counter]}}},_checkCounter:function(){var a=b(this);this._lastInOrder=false;if(this._loopingOn){if(this._randomPlay){if(this._counter>this._playlistItems-1){this._counter=this._randomArr[this._playlistItems-1];this._makeRandomList();this._firstIndexCheck();this._counter=0}else if(this._counter<0){this._counter=this._randomArr[0];this._makeRandomList();this._lastIndexCheck();this._counter=this._playlistItems-1}}else{if(this._counter>this._playlistItems-1){this._counter=0}else if(this._counter<0){this._counter=this._playlistItems-1}}a.trigger("ap_PlaylistManager.COUNTER_READY")}else{if(this._counter>this._playlistItems-1){this._counter=0;this._lastInOrder=true}else if(this._counter<0){this._counter=this._playlistItems-1;this._lastInOrder=false}if(this._lastInOrder){a.trigger("ap_PlaylistManager.PLAYLIST_END")}else{a.trigger("ap_PlaylistManager.COUNTER_READY")}}},_makeRandomList:function(){if(this._playlistItems<3)return;this._randomArr=this._randomiseIndex(this._playlistItems)},_firstIndexCheck:function(){if(this._randomArr[0]==this._counter){var a=this._randomArr.splice(0,1);this._randomArr.push(a)}},_lastIndexCheck:function(){if(this._randomArr[this._playlistItems-1]==this._counter){var a=this._randomArr.splice(this._playlistItems-1,1);this._randomArr.unshift(a)}},_activeIndexFirst:function(){var a=0;var b=this._randomArr.length;for(a;a<b;a++){if(this._randomArr[a]==this._counter){if(a==0){break}var c=this._randomArr.splice(a,1);this._randomArr.unshift(c);break}}},_randomiseIndex:function(a){var b=[];var c=[];var d=0;for(d;d<a;d++){b[d]=d}var e=0,f;for(e;e<a;e++){f=Math.round(Math.random()*(b.length-1));c[e]=b[f];b.splice(f,1)}return c}}})(jQuery)
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user