PageSourceSearch

https://lesperancemandolin.com/wp-content/themes/muse/javascripts/jquery.jplayer.playlist.min.js?ver=2.3.0

js lesperancemandolin.com collected 2026-10-10 00:32:47 UTC 9,201 bytes, 12 lines download raw bytes

1/*
2====================================================================================================
3@name			Playlist Object for the jQuery jPlayer Plugin
4@uri			http://www.jplayer.org
5@version		2.3.0 (jPlayer 2.3.0+)
6@author			Mark J Panaghiston
7@license		Dual licensed under the MIT and GPL licenses
8@copyright		2009 - 2013 Happyworm Ltd
9====================================================================================================
10*/
11
12(function(e,t){jPlayerPlaylist=function(t,n,r){var i=this;this.current=0;this.loop=false;this.shuffled=false;this.removing=false;this.cssSelector=e.extend({},this._cssSelector,t);this.options=e.extend(true,{keyBindings:{next:{key:39,fn:function(){i.next()}},previous:{key:37,fn:function(){i.previous()}}}},this._options,r);this.playlist=[];this.original=[];this._initPlaylist(n);this.cssSelector.title=this.cssSelector.cssSelectorAncestor+" .jp-title";this.cssSelector.playlist=this.cssSelector.cssSelectorAncestor+" .jp-playlist";this.cssSelector.next=this.cssSelector.cssSelectorAncestor+" .jp-next";this.cssSelector.previous=this.cssSelector.cssSelectorAncestor+" .jp-previous";this.cssSelector.shuffle=this.cssSelector.cssSelectorAncestor+" .jp-shuffle";this.cssSelector.shuffleOff=this.cssSelector.cssSelectorAncestor+" .jp-shuffle-off";this.options.cssSelectorAncestor=this.cssSelector.cssSelectorAncestor;this.options.repeat=function(e){i.loop=e.jPlayer.options.loop};e(this.cssSelector.jPlayer).bind(e.jPlayer.event.ready,function(){i._init()});e(this.cssSelector.jPlayer).bind(e.jPlayer.event.ended,function(){i.next()});e(this.cssSelector.jPlayer).bind(e.jPlayer.event.play,function(){e(this).jPlayer("pauseOthers")});e(this.cssSelector.jPlayer).bind(e.jPlayer.event.resize,function(t){if(t.jPlayer.options.fullScreen){e(i.cssSelector.title).show()}else{e(i.cssSelector.title).hide()}});e(this.cssSelector.previous).click(function(){i.previous();e(this).blur();return false});e(this.cssSelector.next).click(function(){i.next();e(this).blur();return false});e(this.cssSelector.shuffle).click(function(){i.shuffle(true);return false});e(this.cssSelector.shuffleOff).click(function(){i.shuffle(false);return false}).hide();if(!this.options.fullScreen){e(this.cssSelector.title).hide()}e(this.cssSelector.playlist+" ul").empty();this._createItemHandlers();e(this.cssSelector.jPlayer).jPlayer(this.options)};jPlayerPlaylist.prototype={_cssSelector:{jPlayer:"#jquery_jplayer_1",cssSelectorAncestor:"#jp_container_1"},_options:{playlistOptions:{autoPlay:false,loopOnPrevious:false,shuffleOnLoop:true,enableRemoveControls:false,displayTime:"slow",addTime:"fast",removeTime:"fast",shuffleTime:"slow",itemClass:"jp-playlist-item",freeGroupClass:"jp-free-media",freeItemClass:"jp-playlist-item-free",removeItemClass:"jp-playlist-item-remove"}},option:function(e,n){if(n===t){return this.options.playlistOptions[e]}this.options.playlistOptions[e]=n;switch(e){case"enableRemoveControls":this._updateControls();break;case"itemClass":case"freeGroupClass":case"freeItemClass":case"removeItemClass":this._refresh(true);this._createItemHandlers();break}return this},_init:function(){var e=this;this._refresh(function(){if(e.options.playlistOptions.autoPlay){e.play(e.current)}else{e.select(e.current)}})},_initPlaylist:function(t){this.current=0;this.shuffled=false;this.removing=false;this.original=e.extend(true,[],t);this._originalPlaylist()},_originalPlaylist:function(){var t=this;this.playlist=[];e.each(this.original,function(e){t.playlist[e]=t.original[e]})},_refresh:function(t){var n=this;if(t&&!e.isFunction(t)){e(this.cssSelector.playlist+" ul").empty();e.each(this.playlist,function(t){e(n.cssSelector.playlist+" ul").append(n._createListItem(n.playlist[t]))});this._updateControls()}else{var r=e(this.cssSelector.playlist+" ul").children().length?this.options.playlistOptions.displayTime:0;e(this.cssSelector.playlist+" ul").slideUp(r,function(){var r=e(this);e(this).empty();e.each(n.playlist,function(e){r.append(n._createListItem(n.playlist[e]))});n._updateControls();if(e.isFunction(t)){t()}if(n.playlist.length){e(this).slideDown(n.options.playlistOptions.displayTime)}
12else{e(this).show()}})}},_createListItem:function(t){var n=this;var r="<li><div>";r+="<a href='javascript:;' class='"+this.options.playlistOptions.removeItemClass+"'>×</a>";if(t.free){var i=true;r+="<span class='"+this.options.playlistOptions.freeGroupClass+"'>(";e.each(t,function(t,s){if(e.jPlayer.prototype.format[t]){if(i){i=false}else{r+=" | "}r+="<a class='"+n.options.playlistOptions.freeItemClass+"' href='"+s+"' tabindex='1'>"+t+"</a>"}});r+=")</span>"}r+="<a href='javascript:;' class='"+this.options.playlistOptions.itemClass+"' tabindex='1'>"+t.title+(t.artist?" <span class='jp-artist'>by "+t.artist+"</span>":"")+"</a>";r+="</div></li>";return r},_createItemHandlers:function(){var t=this;e(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.itemClass).on("click","a."+this.options.playlistOptions.itemClass,function(){var n=e(this).parent().parent().index();if(t.current!==n){t.play(n)}else{e(t.cssSelector.jPlayer).jPlayer("play")}e(this).blur();return false});e(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.freeItemClass).on("click","a."+this.options.playlistOptions.freeItemClass,function(){e(this).parent().parent().find("."+t.options.playlistOptions.itemClass).click();e(this).blur();return false});
12e(this.cssSelector.playlist).off("click","a."+this.options.playlistOptions.removeItemClass).on("click","a."+this.options.playlistOptions.removeItemClass,function(){var n=e(this).parent().parent().index();t.remove(n);e(this).blur();return false})},_updateControls:function(){if(this.options.playlistOptions.enableRemoveControls){e(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).show()}else{e(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).hide()}if(this.shuffled){e(this.cssSelector.shuffleOff).show();e(this.cssSelector.shuffle).hide()}else{e(this.cssSelector.shuffleOff).hide();e(this.cssSelector.shuffle).show()}},_highlight:function(n){if(this.playlist.length&&n!==t){e(this.cssSelector.playlist+" .jp-playlist-current").removeClass("jp-playlist-current");e(this.cssSelector.playlist+" li:nth-child("+(n+1)+")").addClass("jp-playlist-current").find(".jp-playlist-item").addClass("jp-playlist-current");e(this.cssSelector.title+" li").html(this.playlist[n].title+(this.playlist[n].artist?" <span class='jp-artist'>by "+this.playlist[n].artist+"</span>":""))}},setPlaylist:function(e){this._initPlaylist(e);this._init()},add:function(t,n){e(this.cssSelector.playlist+" ul").append(this._createListItem(t)).find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime);this._updateControls();this.original.push(t);this.playlist.push(t);if(n){this.play(this.playlist.length-1)}else{if(this.original.length===1){this.select(0)}}},remove:function(n){var r=this;if(n===t){this._initPlaylist([]);this._refresh(function(){e(r.cssSelector.jPlayer).jPlayer("clearMedia")});return true}else{if(this.removing){return false}else{n=n<0?r.original.length+n:n;if(0<=n&&n<this.playlist.length){this.removing=true;e(this.cssSelector.playlist+" li:nth-child("+(n+1)+")").slideUp(this.options.playlistOptions.removeTime,function(){e(this).remove();if(r.shuffled){var t=r.playlist[n];e.each(r.original,function(e){if(r.original[e]===t){r.original.splice(e,1);return false}});r.playlist.splice(n,1)}else{r.original.splice(n,1);r.playlist.splice(n,1)}if(r.original.length){if(n===r.current){r.current=n<r.original.length?r.current:r.original.length-1;r.select(r.current)}else if(n<r.current){r.current--}}else{e(r.cssSelector.jPlayer).jPlayer("clearMedia");r.current=0;r.shuffled=false;r._updateControls()}r.removing=false})}return true}}},select:function(t){t=t<0?this.original.length+t:t;if(0<=t&&t<this.playlist.length){this.current=t;this._highlight(t);e(this.cssSelector.jPlayer).jPlayer("setMedia",this.playlist[this.current])}else{this.current=0}},play:function(n){n=n<0?this.original.length+n:n;if(0<=n&&n<this.playlist.length){if(this.playlist.length){this.select(n);e(this.cssSelector.jPlayer).jPlayer("play")}}else if(n===t){e(this.cssSelector.jPlayer).jPlayer("play")}},pause:function(){e(this.cssSelector.jPlayer).jPlayer("pause")},next:function(){var e=this.current+1<this.playlist.length?this.current+1:0;if(this.loop){if(e===0&&this.shuffled&&this.options.playlistOptions.shuffleOnLoop&&this.playlist.length>1){this.shuffle(true,true)}else{this.play(e)}}else{if(e>0){this.play(e)}}},previous:function(){var e=this.current-1>=0?this.current-1:this.playlist.length-1;if(this.loop&&this.options.playlistOptions.loopOnPrevious||e<this.playlist.length-1){this.play(e)}},shuffle:function(n,r){var i=this;if(n===t){n=!this.shuffled}if(n||n!==this.shuffled){e(this.cssSelector.playlist+" ul").slideUp(this.options.playlistOptions.shuffleTime,function(){i.shuffled=n;if(n){i.playlist.sort(function(){return.5-Math.random()})}else{i._originalPlaylist()}i._refresh(true);if(r||!e(i.cssSelector.jPlayer).data("jPlayer").status.paused){i.play(0)}else{i.select(0)}e(this).slideDown(i.options.playlistOptions.shuffleTime)})}}}})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.