MP3-jPlayer - Version 1.8.8

Version Description

  • Updated jQuery.jPlayer to 2.6.0.
  • Improved admin-side security.
  • Fixed compatibility with 'Scripts to Footer' plugin.
  • Fixed a routine that could throw a php warning.
Download this release

Release Info

Developer simon.ward
Plugin Icon 128x128 MP3-jPlayer
Version 1.8.8
Comparing to
See all releases

Code changes from version 1.8.6 to 1.8.8

css/images/Thumbs.db ADDED
Binary file
download.php CHANGED
@@ -45,11 +45,12 @@ if ( isset($_GET['mp3']) ) {
45
 
46
  if ( ($fsize = @filesize($_SERVER['DOCUMENT_ROOT'] . $fp)) !== false ) { //if file can be read then set headers and cookie
47
 
 
48
  $cookiename = 'mp3Download' . $playerID;
49
  setcookie($cookiename, "true", 0, '/', '', '', false);
50
  header('Accept-Ranges: bytes'); // download resume
51
  header('Content-Disposition: attachment; filename=' . $file);
52
- header('Content-Type: audio/mpeg');
53
  header('Content-Length: ' . $fsize);
54
 
55
  readfile($_SERVER['DOCUMENT_ROOT'] . $fp);
45
 
46
  if ( ($fsize = @filesize($_SERVER['DOCUMENT_ROOT'] . $fp)) !== false ) { //if file can be read then set headers and cookie
47
 
48
+ header('Content-Type: audio/mpeg');
49
  $cookiename = 'mp3Download' . $playerID;
50
  setcookie($cookiename, "true", 0, '/', '', '', false);
51
  header('Accept-Ranges: bytes'); // download resume
52
  header('Content-Disposition: attachment; filename=' . $file);
53
+
54
  header('Content-Length: ' . $fsize);
55
 
56
  readfile($_SERVER['DOCUMENT_ROOT'] . $fp);
js/Jplayer2-5-0.swf DELETED
Binary file
js/Jplayer2-6-0.swf ADDED
Binary file
js/jquery.jplayer.min2-5-0.js DELETED
@@ -1,114 +0,0 @@
1
- /*
2
- * jPlayer Plugin for jQuery JavaScript Library
3
- * http://www.jplayer.org
4
- *
5
- * Copyright (c) 2009 - 2013 Happyworm Ltd
6
- * Licensed under the MIT license.
7
- * http://opensource.org/licenses/MIT
8
- *
9
- * Author: Mark J Panaghiston
10
- * Version: 2.5.0
11
- * Date: 7th November 2013
12
- */
13
-
14
- (function(b,f){"function"===typeof define&&define.amd?define(["jquery"],f):b.jQuery?f(b.jQuery):f(b.Zepto)})(this,function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this;a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b(this).data("jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b(this).data("jPlayer");c?c.option(a||
15
- {}):b(this).data("jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element=b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};"function"!==typeof b.fn.stop&&(b.fn.stop=function(){});b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent=
16
- "ready flashreset resize repeat error warning";b.jPlayer.event={};b.each("ready flashreset resize repeat click error warning loadstart progress suspend abort emptied stalled play pause loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange".split(" "),function(){b.jPlayer.event[this]="jPlayer_"+this});b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough".split(" ");b.jPlayer.pause=
17
- function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var m=function(){this.init()};m.prototype={init:function(){this.options={timeFormat:b.jPlayer.timeFormat}},time:function(a){var c=new Date(1E3*(a&&"number"===typeof a?a:0)),b=c.getUTCHours();a=this.options.timeFormat.showHour?c.getUTCMinutes():c.getUTCMinutes()+60*
18
- b;c=this.options.timeFormat.showMin?c.getUTCSeconds():c.getUTCSeconds()+60*a;b=this.options.timeFormat.padHour&&10>b?"0"+b:b;a=this.options.timeFormat.padMin&&10>a?"0"+a:a;c=this.options.timeFormat.padSec&&10>c?"0"+c:c;b=""+(this.options.timeFormat.showHour?b+this.options.timeFormat.sepHour:"");b+=this.options.timeFormat.showMin?a+this.options.timeFormat.sepMin:"";return b+=this.options.timeFormat.showSec?c+this.options.timeFormat.sepSec:""}};var n=new m;b.jPlayer.convertTime=function(a){return n.time(a)};
19
- b.jPlayer.uaBrowser=function(a){a=a.toLowerCase();var c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var c=a.toLowerCase(),b=/(android)/,e=/(mobile)/;a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(c)||[];c=/(ipad|playbook)/.exec(c)||!e.exec(c)&&b.exec(c)||
20
- [];a[1]&&(a[1]=a[1].replace(/\s/g,"_"));return{platform:a[1]||"",tablet:c[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var k=b.jPlayer.uaBrowser(navigator.userAgent);k.browser&&(b.jPlayer.browser[k.browser]=!0,b.jPlayer.browser.version=k.version);k=b.jPlayer.uaPlatform(navigator.userAgent);k.platform&&(b.jPlayer.platform[k.platform]=!0,b.jPlayer.platform.mobile=!k.tablet,b.jPlayer.platform.tablet=!!k.tablet);b.jPlayer.getDocMode=function(){var a;b.jPlayer.browser.msie&&(document.documentMode?
21
- a=document.documentMode:(a=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(a=7)));return a};b.jPlayer.browser.documentMode=b.jPlayer.getDocMode();b.jPlayer.nativeFeatures={init:function(){var a=document,c=a.createElement("video"),b={w3c:"fullscreenEnabled fullscreenElement requestFullscreen exitFullscreen fullscreenchange fullscreenerror".split(" "),moz:"mozFullScreenEnabled mozFullScreenElement mozRequestFullScreen mozCancelFullScreen mozfullscreenchange mozfullscreenerror".split(" "),
22
- webkit:" webkitCurrentFullScreenElement webkitRequestFullScreen webkitCancelFullScreen webkitfullscreenchange ".split(" "),webkitVideo:"webkitSupportsFullscreen webkitDisplayingFullscreen webkitEnterFullscreen webkitExitFullscreen ".split(" ")},e=["w3c","moz","webkit","webkitVideo"],g,h;this.fullscreen=c={support:{w3c:!!a[b.w3c[0]],moz:!!a[b.moz[0]],webkit:"function"===typeof a[b.webkit[3]],webkitVideo:"function"===typeof c[b.webkitVideo[2]]},used:{}};g=0;for(h=e.length;g<h;g++){var f=e[g];if(c.support[f]){c.spec=
23
- f;c.used[f]=!0;break}}if(c.spec){var l=b[c.spec];c.api={fullscreenEnabled:!0,fullscreenElement:function(c){c=c?c:a;return c[l[1]]},requestFullscreen:function(a){return a[l[2]]()},exitFullscreen:function(c){c=c?c:a;return c[l[3]]()}};c.event={fullscreenchange:l[4],fullscreenerror:l[5]}}else c.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},c.event={}}};b.jPlayer.nativeFeatures.init();b.jPlayer.focus=null;b.jPlayer.keyIgnoreElementNames=
24
- "INPUT TEXTAREA";var p=function(a){var c=b.jPlayer.focus,d;c&&(b.each(b.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(c,b){if(a.target.nodeName.toUpperCase()===b.toUpperCase())return d=!0,!1}),d||b.each(c.options.keyBindings,function(d,g){if(g&&a.which===g.key&&b.isFunction(g.fn))return a.preventDefault(),g.fn(c),!1}))};b.jPlayer.keys=function(a){b(document.documentElement).unbind("keydown.jPlayer");a&&b(document.documentElement).bind("keydown.jPlayer",p)};b.jPlayer.keys(!0);b.jPlayer.prototype=
25
- {count:0,version:{script:"2.5.0",needFlash:"2.5.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:"metadata",volume:0.8,muted:!1,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:0.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",
26
- volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",playbackRateBar:".jp-playback-rate-bar",playbackRateBarValue:".jp-playback-rate-bar-value",currentTime:".jp-current-time",duration:".jp-duration",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1E3},loop:!1,repeat:function(a){a.jPlayer.options.loop?
27
- b(this).unbind(".jPlayerRepeat").bind(b.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){b(this).jPlayer("play")}):b(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,
28
- android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/,playbook:/playbook/},timeFormat:{},keyEnabled:!1,audioFullScreen:!1,keyBindings:{play:{key:32,fn:function(a){a.status.paused?a.play():a.pause()}},fullScreen:{key:13,fn:function(a){(a.status.video||a.options.audioFullScreen)&&a._setOption("fullScreen",!a.options.fullScreen)}},muted:{key:8,fn:function(a){a._muted(!a.options.muted)}},volumeUp:{key:38,fn:function(a){a.volume(a.options.volume+
29
- 0.1)}},volumeDown:{key:40,fn:function(a){a.volume(a.options.volume-0.1)}}},verticalVolume:!1,verticalPlaybackRate:!1,globalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,consoleAlerts:!0,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",
30
- media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,videoWidth:0,videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,flash:!0},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',
31
- flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',
32
- flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var a=
33
- this;this.element.empty();this.status=b.extend({},this.status);this.internal=b.extend({},this.internal);this.options.timeFormat=b.extend({},b.jPlayer.timeFormat,this.options.timeFormat);this.internal.cmdsIgnored=b.jPlayer.platform.ipad||b.jPlayer.platform.iphone||b.jPlayer.platform.ipod;this.internal.domNode=this.element.get(0);this.options.keyEnabled&&!b.jPlayer.focus&&(b.jPlayer.focus=this);this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video=
34
- {};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);b.each(this.options.supplied.toLowerCase().split(","),function(c,d){var e=d.replace(/^\s+|\s+$/g,"");if(a.format[e]){var f=!1;b.each(a.formats,function(a,c){if(e===c)return f=!0,!1});f||a.formats.push(e)}});b.each(this.options.solution.toLowerCase().split(","),function(c,d){var e=d.replace(/^\s+|\s+$/g,"");if(a.solution[e]){var f=!1;b.each(a.solutions,function(a,
35
- c){if(e===c)return f=!0,!1});f||a.solutions.push(e)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=b.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=b.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:f});this.internal.video=b.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:f});this.internal.flash=
36
- b.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:f,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"Jplayer.swf":"")});this.internal.poster=b.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:f});b.each(b.jPlayer.event,function(c,b){a.options[c]!==f&&(a.element.bind(b+".jPlayer",a.options[c]),a.options[c]=f)});this.require.audio=!1;this.require.video=!1;b.each(this.formats,function(c,
37
- b){a.require[a.format[b].media]=!0});this.options=this.require.video?b.extend(!0,{},this.optionsVideo,this.options):b.extend(!0,{},this.optionsAudio,this.options);this._setSize();this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow);this.status.noVolume=this._uaBlocklist(this.options.noVolume);b.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners();this._restrictNativeVideoControls();
38
- this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){a.status.video&&!a.status.waitForPlay||a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=b("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.internal.poster.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)});
39
- this.html.audio.available=!1;this.require.audio&&(this.htmlElement.audio=document.createElement("audio"),this.htmlElement.audio.id=this.internal.audio.id,this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio));this.html.video.available=!1;this.require.video&&(this.htmlElement.video=document.createElement("video"),this.htmlElement.video.id=this.internal.video.id,this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video));
40
- this.flash.available=this._checkForFlash(10.1);this.html.canPlay={};this.flash.canPlay={};b.each(this.formats,function(c,b){a.html.canPlay[b]=a.html[a.format[b].media].available&&""!==a.htmlElement[a.format[b].media].canPlayType(a.format[b].codec);a.flash.canPlay[b]=a.format[b].flashCanPlay&&a.flash.available});this.html.desired=!1;this.flash.desired=!1;b.each(this.solutions,function(c,d){if(0===c)a[d].desired=!0;else{var e=!1,f=!1;b.each(a.formats,function(c,b){a[a.solutions[0]].canPlay[b]&&("video"===
41
- a.format[b].media?f=!0:e=!0)});a[d].desired=a.require.audio&&!e||a.require.video&&!f}});this.html.support={};this.flash.support={};b.each(this.formats,function(c,b){a.html.support[b]=a.html.canPlay[b]&&a.html.desired;a.flash.support[b]=a.flash.canPlay[b]&&a.flash.desired});this.html.used=!1;this.flash.used=!1;b.each(this.solutions,function(c,d){b.each(a.formats,function(c,b){if(a[d].support[b])return a[d].used=!0,!1})});this._resetActive();this._resetGate();this._cssSelectorAncestor(this.options.cssSelectorAncestor);
42
- this.html.used||this.flash.used?this.css.jq.noSolution.length&&this.css.jq.noSolution.hide():(this._error({type:b.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SOLUTION,hint:b.jPlayer.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show());if(this.flash.used){var c,d="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+
43
- "&muted="+this.options.muted;if(b.jPlayer.browser.msie&&(9>Number(b.jPlayer.browser.version)||9>b.jPlayer.browser.documentMode)){d=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+d+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];c=document.createElement('<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0" tabindex="-1"></object>');
44
- for(var e=0;e<d.length;e++)c.appendChild(document.createElement(d[e]))}else e=function(a,c,b){var d=document.createElement("param");d.setAttribute("name",c);d.setAttribute("value",b);a.appendChild(d)},c=document.createElement("object"),c.setAttribute("id",this.internal.flash.id),c.setAttribute("name",this.internal.flash.id),c.setAttribute("data",this.internal.flash.swf),c.setAttribute("type","application/x-shockwave-flash"),c.setAttribute("width","1"),c.setAttribute("height","1"),c.setAttribute("tabindex",
45
- "-1"),e(c,"flashvars",d),e(c,"allowscriptaccess","always"),e(c,"bgcolor",this.options.backgroundColor),e(c,"wmode",this.options.wmode);this.element.append(c);this.internal.flash.jq=b(c)}this.status.playbackRateEnabled=this.html.used&&!this.flash.used?this._testPlaybackRate("audio"):!1;this._updatePlaybackRate();this.html.used&&(this.html.audio.available&&(this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio),this.element.append(this.htmlElement.audio),this.internal.audio.jq=b("#"+this.internal.audio.id)),
46
- this.html.video.available&&(this._addHtmlEventListeners(this.htmlElement.video,this.html.video),this.element.append(this.htmlElement.video),this.internal.video.jq=b("#"+this.internal.video.id),this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):this.internal.video.jq.css({width:"0px",height:"0px"}),this.internal.video.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)})));this.options.emulateHtml&&this._emulateHtmlBridge();
47
- this.html.used&&!this.flash.used&&setTimeout(function(){a.internal.ready=!0;a.version.flash="n/a";a._trigger(b.jPlayer.event.repeat);a._trigger(b.jPlayer.event.ready)},100);this._updateNativeVideoControls();this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();b.jPlayer.prototype.count++},destroy:function(){this.clearMedia();this._removeUiClass();this.css.jq.currentTime.length&&this.css.jq.currentTime.text("");this.css.jq.duration.length&&this.css.jq.duration.text("");b.each(this.css.jq,function(a,
48
- c){c.length&&c.unbind(".jPlayer")});this.internal.poster.jq.unbind(".jPlayer");this.internal.video.jq&&this.internal.video.jq.unbind(".jPlayer");this._fullscreenRemoveEventListeners();this===b.jPlayer.focus&&(b.jPlayer.focus=null);this.options.emulateHtml&&this._destroyHtmlBridge();this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();delete this.instances[this.internal.instance]},enable:function(){},disable:function(){},_testCanPlayType:function(a){try{return a.canPlayType(this.format.mp3.codec),
49
- !0}catch(c){return!1}},_testPlaybackRate:function(a){a=document.createElement("string"===typeof a?a:"audio");try{return"playbackRate"in a?(a.playbackRate=0.5,0.5===a.playbackRate):!1}catch(c){return!1}},_uaBlocklist:function(a){var c=navigator.userAgent.toLowerCase(),d=!1;b.each(a,function(a,b){if(b&&b.test(c))return d=!0,!1});return d},_restrictNativeVideoControls:function(){this.require.audio&&this.status.nativeVideoControls&&(this.status.nativeVideoControls=!1,this.status.noFullWindow=!0)},_updateNativeVideoControls:function(){this.html.video.available&&
50
- this.html.used&&(this.htmlElement.video.controls=this.status.nativeVideoControls,this._updateAutohide(),this.status.nativeVideoControls&&this.require.video?(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})):this.status.waitForPlay&&this.status.video&&(this.internal.poster.jq.show(),this.internal.video.jq.css({width:"0px",height:"0px"})))},_addHtmlEventListeners:function(a,c){var d=this;a.preload=this.options.preload;a.muted=this.options.muted;
51
- a.volume=this.options.volume;this.status.playbackRateEnabled&&(a.defaultPlaybackRate=this.options.defaultPlaybackRate,a.playbackRate=this.options.playbackRate);a.addEventListener("progress",function(){c.gate&&(d.internal.cmdsIgnored&&0<this.readyState&&(d.internal.cmdsIgnored=!1),d._getHtmlStatus(a),d._updateInterface(),d._trigger(b.jPlayer.event.progress))},!1);a.addEventListener("timeupdate",function(){c.gate&&(d._getHtmlStatus(a),d._updateInterface(),d._trigger(b.jPlayer.event.timeupdate))},!1);
52
- a.addEventListener("durationchange",function(){c.gate&&(d._getHtmlStatus(a),d._updateInterface(),d._trigger(b.jPlayer.event.durationchange))},!1);a.addEventListener("play",function(){c.gate&&(d._updateButtons(!0),d._html_checkWaitForPlay(),d._trigger(b.jPlayer.event.play))},!1);a.addEventListener("playing",function(){c.gate&&(d._updateButtons(!0),d._seeked(),d._trigger(b.jPlayer.event.playing))},!1);a.addEventListener("pause",function(){c.gate&&(d._updateButtons(!1),d._trigger(b.jPlayer.event.pause))},
53
- !1);a.addEventListener("waiting",function(){c.gate&&(d._seeking(),d._trigger(b.jPlayer.event.waiting))},!1);a.addEventListener("seeking",function(){c.gate&&(d._seeking(),d._trigger(b.jPlayer.event.seeking))},!1);a.addEventListener("seeked",function(){c.gate&&(d._seeked(),d._trigger(b.jPlayer.event.seeked))},!1);a.addEventListener("volumechange",function(){c.gate&&(d.options.volume=a.volume,d.options.muted=a.muted,d._updateMute(),d._updateVolume(),d._trigger(b.jPlayer.event.volumechange))},!1);a.addEventListener("ratechange",
54
- function(){c.gate&&(d.options.defaultPlaybackRate=a.defaultPlaybackRate,d.options.playbackRate=a.playbackRate,d._updatePlaybackRate(),d._trigger(b.jPlayer.event.ratechange))},!1);a.addEventListener("suspend",function(){c.gate&&(d._seeked(),d._trigger(b.jPlayer.event.suspend))},!1);a.addEventListener("ended",function(){c.gate&&(b.jPlayer.browser.webkit||(d.htmlElement.media.currentTime=0),d.htmlElement.media.pause(),d._updateButtons(!1),d._getHtmlStatus(a,!0),d._updateInterface(),d._trigger(b.jPlayer.event.ended))},
55
- !1);a.addEventListener("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(clearTimeout(d.internal.htmlDlyCmdId),d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:b.jPlayer.error.URL,context:d.status.src,message:b.jPlayer.errorMsg.URL,
56
- hint:b.jPlayer.errorHint.URL})))},!1);b.each(b.jPlayer.htmlEvent,function(e,g){a.addEventListener(this,function(){c.gate&&d._trigger(b.jPlayer.event[g])},!1)})},_getHtmlStatus:function(a,c){var b=0,e=0,g=0,f=0;isFinite(a.duration)&&(this.status.duration=a.duration);b=a.currentTime;e=0<this.status.duration?100*b/this.status.duration:0;"object"===typeof a.seekable&&0<a.seekable.length?(g=0<this.status.duration?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100,f=0<this.status.duration?
57
- 100*a.currentTime/a.seekable.end(a.seekable.length-1):0):(g=100,f=e);c&&(e=f=b=0);this.status.seekPercent=g;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=e;this.status.currentTime=b;this.status.videoWidth=a.videoWidth;this.status.videoHeight=a.videoHeight;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate=a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=b.extend({},this.status,b.jPlayer.prototype.status)},
58
- _trigger:function(a,c,d){a=b.Event(a);a.jPlayer={};a.jPlayer.version=b.extend({},this.version);a.jPlayer.options=b.extend(!0,{},this.options);a.jPlayer.status=b.extend(!0,{},this.status);a.jPlayer.html=b.extend(!0,{},this.html);a.jPlayer.flash=b.extend(!0,{},this.flash);c&&(a.jPlayer.error=b.extend({},c));d&&(a.jPlayer.warning=b.extend({},d));this.element.trigger(a)},jPlayerFlashEvent:function(a,c){if(a===b.jPlayer.event.ready)if(!this.internal.ready)this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",
59
- height:"0px"}),this.version.flash=c.version,this.version.needFlash!==this.version.flash&&this._error({type:b.jPlayer.error.VERSION,context:this.version.flash,message:b.jPlayer.errorMsg.VERSION+this.version.flash,hint:b.jPlayer.errorHint.VERSION}),this._trigger(b.jPlayer.event.repeat),this._trigger(a);else if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);this.volumeWorker(this.options.volume);0<d&&(e?this.pause(d):this.play(d))}this._trigger(b.jPlayer.event.flashreset)}if(this.flash.gate)switch(a){case b.jPlayer.event.progress:this._getFlashStatus(c);
60
- this._updateInterface();this._trigger(a);break;case b.jPlayer.event.timeupdate:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.play:this._seeked();this._updateButtons(!0);this._trigger(a);break;case b.jPlayer.event.pause:this._updateButtons(!1);this._trigger(a);break;case b.jPlayer.event.ended:this._updateButtons(!1);this._trigger(a);break;case b.jPlayer.event.click:this._trigger(a);break;case b.jPlayer.event.error:this.status.waitForLoad=!0;this.status.waitForPlay=
61
- !0;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._updateButtons(!1);this._error({type:b.jPlayer.error.URL,context:c.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL});break;case b.jPlayer.event.seeking:this._seeking();
62
- this._trigger(a);break;case b.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case b.jPlayer.event.ready:break;default:this._trigger(a)}return!1},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.videoWidth=a.videoWidth;this.status.videoHeight=a.videoHeight;this.status.readyState=
63
- 4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=!1},_updateButtons:function(a){a===f?a=!this.status.paused:this.status.paused=!a;this.css.jq.play.length&&this.css.jq.pause.length&&(a?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide()));this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&&(this.status.noFullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullWindow?(this.css.jq.fullScreen.hide(),
64
- this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide()));this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(this.css.jq.repeat.show(),this.css.jq.repeatOff.hide()))},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&(this.options.smoothPlayBar?this.css.jq.playBar.stop().animate({width:this.status.currentPercentAbsolute+
65
- "%"},250,"linear"):this.css.jq.playBar.width(this.status.currentPercentRelative+"%"));this.css.jq.currentTime.length&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime));this.css.jq.duration.length&&this.css.jq.duration.text(this._convertTime(this.status.duration))},_convertTime:m.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},
66
- _resetGate:function(){this.html.audio.gate=!1;this.html.video.gate=!1;this.flash.gate=!1},_resetActive:function(){this.html.active=!1;this.flash.active=!1},_escapeHtml:function(a){return a.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")},_qualifyURL:function(a){var c=document.createElement("div");c.innerHTML='<a href="'+this._escapeHtml(a)+'">x</a>';return c.firstChild.href},_absoluteMediaUrls:function(a){var c=this;b.each(a,function(b,e){c.format[b]&&
67
- (a[b]=c._qualifyURL(e))});return a},setMedia:function(a){var c=this,d=!1,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();a=this._absoluteMediaUrls(a);b.each(this.formats,function(e,f){var k="video"===c.format[f].media;b.each(c.solutions,function(b,e){if(c[e].support[f]&&c._validString(a[f])){var g="html"===e;k?(g?(c.html.video.gate=!0,c._html_setVideo(a),c.html.active=!0):(c.flash.gate=!0,c._flash_setVideo(a),c.flash.active=!0),c.css.jq.videoPlay.length&&
68
- c.css.jq.videoPlay.show(),c.status.video=!0):(g?(c.html.audio.gate=!0,c._html_setAudio(a),c.html.active=!0):(c.flash.gate=!0,c._flash_setAudio(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1);d=!0;return!1}});if(d)return!1});d?(this.status.nativeVideoControls&&this.html.video.gate||!this._validString(a.poster)||(e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show()),this.status.srcSet=!0,this.status.media=b.extend({},a),this._updateButtons(!1),
69
- this._updateInterface()):this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(!1);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia();
70
- this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(b.jPlayer.focus=this)},play:function(a){a="number"===typeof a?a:NaN;this.status.srcSet?(this.focus(),this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a)):this._urlNotSetError("play")},
71
- videoPlay:function(){this.play()},pause:function(a){a="number"===typeof a?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},tellOthers:function(a,c){var d=this,e="function"===typeof c,g=Array.prototype.slice.call(arguments);"string"===typeof a&&(e&&g.splice(1,1),b.each(this.instances,function(){d.element!==this&&(e&&!c.call(this.data("jPlayer"),d)||this.jPlayer.apply(this,g))}))},pauseOthers:function(a){this.tellOthers("pause",
72
- function(){return this.status.srcSet},a)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a);this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},
73
- a)},mutedWorker:function(a){this.options.muted=a;this.html.used&&this._html_setProperty("muted",a);this.flash.used&&this._flash_mute(a);this.html.video.gate||this.html.audio.gate||(this._updateMute(a),this._updateVolume(this.options.volume),this._trigger(b.jPlayer.event.volumechange))},mute:function(a){a=a===f?!0:!!a;this._muted(a)},unmute:function(a){a=a===f?!0:!!a;this._muted(!a)},_updateMute:function(a){a===f&&(a=this.options.muted);this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?
74
- (this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){this.volumeWorker(a);this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_setProperty("volume",a);this.flash.used&&this._flash_volume(a);this.html.video.gate||this.html.audio.gate||
75
- (this._updateVolume(a),this._trigger(b.jPlayer.event.volumechange))},volumeBar:function(a){if(this.css.jq.volumeBar.length){var c=b(a.currentTarget),d=c.offset(),e=a.pageX-d.left,g=c.width();a=c.height()-a.pageY+d.top;c=c.height();this.options.verticalVolume?this.volume(a/c):this.volume(e/g)}this.options.muted&&this._muted(!1)},volumeBarValue:function(){},_updateVolume:function(a){a===f&&(a=this.options.volume);a=this.options.muted?0:a;this.status.noVolume?(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(),
76
- this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*a+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(a){var c=
77
- this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&1!==this.ancestorJq.length&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)});this._updateInterface();this._updateButtons();this._updateAutohide();this._updateVolume();
78
- this._updateMute()},_cssSelector:function(a,c){var d=this;"string"===typeof c?b.jPlayer.prototype.options.cssSelector[a]?(this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer"),this.options.cssSelector[a]=c,this.css.cs[a]=this.options.cssSelectorAncestor+" "+c,this.css.jq[a]=c?b(this.css.cs[a]):[],this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(c){c.preventDefault();d[a](c);b(this).blur()}),c&&1!==this.css.jq[a].length&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,
79
- context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD}):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})},
80
- seekBar:function(a){if(this.css.jq.seekBar.length){var c=b(a.currentTarget),d=c.offset();a=a.pageX-d.left;c=c.width();this.playHead(100*a/c)}},playBar:function(){},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(a){if(this.css.jq.playbackRateBar.length){var c=b(a.currentTarget),d=c.offset(),e=a.pageX-d.left,g=c.width();a=c.height()-a.pageY+d.top;c=c.height();this.playbackRate((this.options.verticalPlaybackRate?a/c:e/g)*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+
81
- this.options.minPlaybackRate)}},playbackRateBarValue:function(){},_updatePlaybackRate:function(){var a=(this.options.playbackRate-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(),this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*a+"%"))):
82
- (this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(){this._loop(!0)},repeatOff:function(){this._loop(!1)},_loop:function(a){this.options.loop!==a&&(this.options.loop=a,this._updateButtons(),this._trigger(b.jPlayer.event.repeat))},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(a,c){var d=a;if(0===arguments.length)return b.extend(!0,
83
- {},this.options);if("string"===typeof a){var e=a.split(".");if(c===f){for(var d=b.extend(!0,{},this.options),g=0;g<e.length;g++)if(d[e[g]]!==f)d=d[e[g]];else return this._warning({type:b.jPlayer.warning.OPTION_KEY,context:a,message:b.jPlayer.warningMsg.OPTION_KEY,hint:b.jPlayer.warningHint.OPTION_KEY}),f;return d}for(var g=d={},h=0;h<e.length;h++)h<e.length-1?(g[e[h]]={},g=g[e[h]]):g[e[h]]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(a,b){c._setOption(a,
84
- b)});return this},_setOption:function(a,c){var d=this;switch(a){case "volume":this.volume(c);break;case "muted":this._muted(c);break;case "globalVolume":this.options[a]=c;break;case "cssSelectorAncestor":this._cssSelectorAncestor(c);break;case "cssSelector":b.each(c,function(a,c){d._cssSelector(a,c)});break;case "playbackRate":this.options[a]=c=this._limitValue(c,this.options.minPlaybackRate,this.options.maxPlaybackRate);this.html.used&&this._html_setProperty("playbackRate",c);this._updatePlaybackRate();
85
- break;case "defaultPlaybackRate":this.options[a]=c=this._limitValue(c,this.options.minPlaybackRate,this.options.maxPlaybackRate);this.html.used&&this._html_setProperty("defaultPlaybackRate",c);this._updatePlaybackRate();break;case "minPlaybackRate":this.options[a]=c=this._limitValue(c,0.1,this.options.maxPlaybackRate-0.1);this._updatePlaybackRate();break;case "maxPlaybackRate":this.options[a]=c=this._limitValue(c,this.options.minPlaybackRate+0.1,16);this._updatePlaybackRate();break;case "fullScreen":if(this.options[a]!==
86
- c){var e=b.jPlayer.nativeFeatures.fullscreen.used.webkitVideo;if(!e||e&&!this.status.waitForPlay)e||(this.options[a]=c),c?this._requestFullscreen():this._exitFullscreen(),e||this._setOption("fullWindow",c)}break;case "fullWindow":this.options[a]!==c&&(this._removeUiClass(),this.options[a]=c,this._refreshSize());break;case "size":this.options.fullWindow||this.options[a].cssClass===c.cssClass||this._removeUiClass();this.options[a]=b.extend({},this.options[a],c);this._refreshSize();break;case "sizeFull":this.options.fullWindow&&
87
- this.options[a].cssClass!==c.cssClass&&this._removeUiClass();this.options[a]=b.extend({},this.options[a],c);this._refreshSize();break;case "autohide":this.options[a]=b.extend({},this.options[a],c);this._updateAutohide();break;case "loop":this._loop(c);break;case "nativeVideoControls":this.options[a]=b.extend({},this.options[a],c);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this._restrictNativeVideoControls();this._updateNativeVideoControls();break;case "noFullWindow":this.options[a]=
88
- b.extend({},this.options[a],c);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow);this._restrictNativeVideoControls();this._updateButtons();break;case "noVolume":this.options[a]=b.extend({},this.options[a],c);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._updateVolume();this._updateMute();break;case "emulateHtml":this.options[a]!==c&&((this.options[a]=c)?this._emulateHtmlBridge():
89
- this._destroyHtmlBridge());break;case "timeFormat":this.options[a]=b.extend({},this.options[a],c);break;case "keyEnabled":this.options[a]=c;c||this!==b.jPlayer.focus||(b.jPlayer.focus=null);break;case "keyBindings":this.options[a]=b.extend(!0,{},this.options[a],c);break;case "audioFullScreen":this.options[a]=c}return this},_refreshSize:function(){this._setSize();this._addUiClass();this._updateSize();this._updateButtons();this._updateAutohide();this._trigger(b.jPlayer.event.resize)},_setSize:function(){this.options.fullWindow?
90
- (this.status.width=this.options.sizeFull.width,this.status.height=this.options.sizeFull.height,this.status.cssClass=this.options.sizeFull.cssClass):(this.status.width=this.options.size.width,this.status.height=this.options.size.height,this.status.cssClass=this.options.size.cssClass);this.element.css({width:this.status.width,height:this.status.height})},_addUiClass:function(){this.ancestorJq.length&&this.ancestorJq.addClass(this.status.cssClass)},_removeUiClass:function(){this.ancestorJq.length&&this.ancestorJq.removeClass(this.status.cssClass)},
91
- _updateSize:function(){this.internal.poster.jq.css({width:this.status.width,height:this.status.height});!this.status.waitForPlay&&this.html.active&&this.status.video||this.html.video.available&&this.html.used&&this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):!this.status.waitForPlay&&this.flash.active&&this.status.video&&this.internal.flash.jq.css({width:this.status.width,height:this.status.height})},_updateAutohide:function(){var a=this,
92
- c=function(){a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId);a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},a.options.autohide.hold)})};this.css.jq.gui.length&&(this.css.jq.gui.stop(!0,!0),clearTimeout(this.internal.autohideId),this.element.unbind(".jPlayerAutohide"),this.css.jq.gui.unbind(".jPlayerAutohide"),this.status.nativeVideoControls?this.css.jq.gui.hide():this.options.fullWindow&&this.options.autohide.full||
93
- !this.options.fullWindow&&this.options.autohide.restored?(this.element.bind("mousemove.jPlayer.jPlayerAutohide",c),this.css.jq.gui.bind("mousemove.jPlayer.jPlayerAutohide",c),this.css.jq.gui.hide()):this.css.jq.gui.show())},fullScreen:function(){this._setOption("fullScreen",!0)},restoreScreen:function(){this._setOption("fullScreen",!1)},_fullscreenAddEventListeners:function(){var a=this,c=b.jPlayer.nativeFeatures.fullscreen;c.api.fullscreenEnabled&&c.event.fullscreenchange&&("function"!==typeof this.internal.fullscreenchangeHandler&&
94
- (this.internal.fullscreenchangeHandler=function(){a._fullscreenchange()}),document.addEventListener(c.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1))},_fullscreenRemoveEventListeners:function(){var a=b.jPlayer.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.addEventListener(a.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1)},_fullscreenchange:function(){this.options.fullScreen&&!b.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()&&
95
- this._setOption("fullScreen",!1)},_requestFullscreen:function(){var a=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],c=b.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(a=this.htmlElement.video);c.api.fullscreenEnabled&&c.api.requestFullscreen(a)},_exitFullscreen:function(){var a=b.jPlayer.nativeFeatures.fullscreen,c;a.used.webkitVideo&&(c=this.htmlElement.video);a.api.fullscreenEnabled&&a.api.exitFullscreen(c)},_html_initMedia:function(a){var c=b(this.htmlElement.media).empty();
96
- b.each(a.track||[],function(a,b){var g=document.createElement("track");g.setAttribute("kind",b.kind?b.kind:"");g.setAttribute("src",b.src?b.src:"");g.setAttribute("srclang",b.srclang?b.srclang:"");g.setAttribute("label",b.label?b.label:"");b.def&&g.setAttribute("default",b.def);c.append(g)});this.htmlElement.media.src=this.status.src;"none"!==this.options.preload&&this._html_load();this._trigger(b.jPlayer.event.timeupdate)},_html_setFormat:function(a){var c=this;b.each(this.formats,function(b,e){if(c.html.support[e]&&
97
- a[e])return c.status.src=a[e],c.status.format[e]=!0,c.status.formatType=e,!1})},_html_setAudio:function(a){this._html_setFormat(a);this.htmlElement.media=this.htmlElement.audio;this._html_initMedia(a)},_html_setVideo:function(a){this._html_setFormat(a);this.status.nativeVideoControls&&(this.htmlElement.video.poster=this._validString(a.poster)?a.poster:"");this.htmlElement.media=this.htmlElement.video;this._html_initMedia(a)},_html_resetMedia:function(){this.htmlElement.media&&(this.htmlElement.media.id!==
98
- this.internal.video.id||this.status.nativeVideoControls||this.internal.video.jq.css({width:"0px",height:"0px"}),this.htmlElement.media.pause())},_html_clearMedia:function(){this.htmlElement.media&&(this.htmlElement.media.src="about:blank",this.htmlElement.media.load())},_html_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.htmlElement.media.load());clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this,d=this.htmlElement.media;this._html_load();if(isNaN(a))d.play();
99
- else{this.internal.cmdsIgnored&&d.play();try{if(!d.seekable||"object"===typeof d.seekable&&0<d.seekable.length)d.currentTime=a,d.play();else throw 1;}catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},250);return}}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this,d=this.htmlElement.media;0<a?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);d.pause();if(!isNaN(a))try{if(!d.seekable||"object"===typeof d.seekable&&0<d.seekable.length)d.currentTime=a;else throw 1;
100
- }catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},250);return}0<a&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this,d=this.htmlElement.media;this._html_load();try{if("object"===typeof d.seekable&&0<d.seekable.length)d.currentTime=a*d.seekable.end(d.seekable.length-1)/100;else if(0<d.duration&&!isNaN(d.duration))d.currentTime=a*d.duration/100;else throw"e";}catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},250);return}this.status.waitForLoad||
101
- this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})))},_html_setProperty:function(a,b){this.html.audio.available&&(this.htmlElement.audio[a]=b);this.html.video.available&&(this.htmlElement.video[a]=b)},_flash_setAudio:function(a){var c=this;try{b.each(this.formats,
102
- function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4a":case "fla":c._getMovie().fl_setAudio_m4a(a[d]);break;case "mp3":c._getMovie().fl_setAudio_mp3(a[d]);break;case "rtmpa":c._getMovie().fl_setAudio_rtmp(a[d])}c.status.src=a[d];c.status.format[d]=!0;c.status.formatType=d;return!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&
103
- a[d]){switch(d){case "m4v":case "flv":c._getMovie().fl_setVideo_m4v(a[d]);break;case "rtmpv":c._getMovie().fl_setVideo_rtmp(a[d])}c.status.src=a[d];c.status.format[d]=!0;c.status.formatType=d;return!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},
104
- _flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=!1},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=!1;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}0<a&&(this.status.waitForLoad=!1,this._flash_checkWaitForPlay())},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||
105
- this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height})))},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},
106
- _getFlashPluginVersion:function(){var a=0,b;if(window.ActiveXObject)try{if(b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var d=b.GetVariable("$version");d&&(d=d.split(" ")[1].split(","),a=parseInt(d[0],10)+"."+parseInt(d[1],10))}}catch(e){}else navigator.plugins&&0<navigator.mimeTypes.length&&(b=navigator.plugins["Shockwave Flash"])&&(a=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1"));return 1*a},_checkForFlash:function(a){var b=!1;this._getFlashPluginVersion()>=
107
- a&&(b=!0);return b},_validString:function(a){return a&&"string"===typeof a},_limitValue:function(a,b,d){return a<b?b:a>d?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c],context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});
108
- this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},_alert:function(a){a="jPlayer "+this.version.script+" : id='"+this.internal.self.id+
109
- "' : "+a;this.options.consoleAlerts?console&&console.log&&console.log(a):alert(a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=!0;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=!1});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate();var b=document.createEvent("Event");b.initEvent(c,!1,!0);a.internal.domNode.dispatchEvent(b)})})},
110
- _emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+" "+b.jPlayer.emulateOptions).split(/\s+/g),function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",
111
- NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",
112
- URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",
113
- URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",
114
- OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery.jplayer.min2-6-0.js ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jPlayer Plugin for jQuery JavaScript Library
3
+ * http://www.jplayer.org
4
+ *
5
+ * Copyright (c) 2009 - 2014 Happyworm Ltd
6
+ * Licensed under the MIT license.
7
+ * http://opensource.org/licenses/MIT
8
+ *
9
+ * Author: Mark J Panaghiston
10
+ * Version: 2.6.0
11
+ * Date: 2nd April 2014
12
+ */
13
+
14
+ (function(b,f){"function"===typeof define&&define.amd?define(["jquery"],f):b.jQuery?f(b.jQuery):f(b.Zepto)})(this,function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this;a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b(this).data("jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b(this).data("jPlayer");c?c.option(a||
15
+ {}):b(this).data("jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element=b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};"function"!==typeof b.fn.stop&&(b.fn.stop=function(){});b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent=
16
+ "ready flashreset resize repeat error warning";b.jPlayer.event={};b.each("ready setmedia flashreset resize repeat click error warning loadstart progress suspend abort emptied stalled play pause loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange".split(" "),function(){b.jPlayer.event[this]="jPlayer_"+this});b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough".split(" ");
17
+ b.jPlayer.pause=function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var l=function(){this.init()};l.prototype={init:function(){this.options={timeFormat:b.jPlayer.timeFormat}},time:function(a){var c=new Date(1E3*(a&&"number"===typeof a?a:0)),b=c.getUTCHours();a=this.options.timeFormat.showHour?c.getUTCMinutes():c.getUTCMinutes()+
18
+ 60*b;c=this.options.timeFormat.showMin?c.getUTCSeconds():c.getUTCSeconds()+60*a;b=this.options.timeFormat.padHour&&10>b?"0"+b:b;a=this.options.timeFormat.padMin&&10>a?"0"+a:a;c=this.options.timeFormat.padSec&&10>c?"0"+c:c;b=""+(this.options.timeFormat.showHour?b+this.options.timeFormat.sepHour:"");b+=this.options.timeFormat.showMin?a+this.options.timeFormat.sepMin:"";return b+=this.options.timeFormat.showSec?c+this.options.timeFormat.sepSec:""}};var n=new l;b.jPlayer.convertTime=function(a){return n.time(a)};
19
+ b.jPlayer.uaBrowser=function(a){a=a.toLowerCase();var c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var c=a.toLowerCase(),b=/(android)/,e=/(mobile)/;a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(c)||[];c=/(ipad|playbook)/.exec(c)||!e.exec(c)&&b.exec(c)||
20
+ [];a[1]&&(a[1]=a[1].replace(/\s/g,"_"));return{platform:a[1]||"",tablet:c[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var k=b.jPlayer.uaBrowser(navigator.userAgent);k.browser&&(b.jPlayer.browser[k.browser]=!0,b.jPlayer.browser.version=k.version);k=b.jPlayer.uaPlatform(navigator.userAgent);k.platform&&(b.jPlayer.platform[k.platform]=!0,b.jPlayer.platform.mobile=!k.tablet,b.jPlayer.platform.tablet=!!k.tablet);b.jPlayer.getDocMode=function(){var a;b.jPlayer.browser.msie&&(document.documentMode?
21
+ a=document.documentMode:(a=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(a=7)));return a};b.jPlayer.browser.documentMode=b.jPlayer.getDocMode();b.jPlayer.nativeFeatures={init:function(){var a=document,c=a.createElement("video"),b={w3c:"fullscreenEnabled fullscreenElement requestFullscreen exitFullscreen fullscreenchange fullscreenerror".split(" "),moz:"mozFullScreenEnabled mozFullScreenElement mozRequestFullScreen mozCancelFullScreen mozfullscreenchange mozfullscreenerror".split(" "),
22
+ webkit:" webkitCurrentFullScreenElement webkitRequestFullScreen webkitCancelFullScreen webkitfullscreenchange ".split(" "),webkitVideo:"webkitSupportsFullscreen webkitDisplayingFullscreen webkitEnterFullscreen webkitExitFullscreen ".split(" ")},e=["w3c","moz","webkit","webkitVideo"],g,h;this.fullscreen=c={support:{w3c:!!a[b.w3c[0]],moz:!!a[b.moz[0]],webkit:"function"===typeof a[b.webkit[3]],webkitVideo:"function"===typeof c[b.webkitVideo[2]]},used:{}};g=0;for(h=e.length;g<h;g++){var f=e[g];if(c.support[f]){c.spec=
23
+ f;c.used[f]=!0;break}}if(c.spec){var m=b[c.spec];c.api={fullscreenEnabled:!0,fullscreenElement:function(c){c=c?c:a;return c[m[1]]},requestFullscreen:function(a){return a[m[2]]()},exitFullscreen:function(c){c=c?c:a;return c[m[3]]()}};c.event={fullscreenchange:m[4],fullscreenerror:m[5]}}else c.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},c.event={}}};b.jPlayer.nativeFeatures.init();b.jPlayer.focus=null;b.jPlayer.keyIgnoreElementNames=
24
+ "INPUT TEXTAREA";var p=function(a){var c=b.jPlayer.focus,d;c&&(b.each(b.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(c,b){if(a.target.nodeName.toUpperCase()===b.toUpperCase())return d=!0,!1}),d||b.each(c.options.keyBindings,function(d,g){if(g&&a.which===g.key&&b.isFunction(g.fn))return a.preventDefault(),g.fn(c),!1}))};b.jPlayer.keys=function(a){b(document.documentElement).unbind("keydown.jPlayer");a&&b(document.documentElement).bind("keydown.jPlayer",p)};b.jPlayer.keys(!0);b.jPlayer.prototype=
25
+ {count:0,version:{script:"2.6.0",needFlash:"2.6.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:"metadata",volume:0.8,muted:!1,remainingDuration:!1,toggleDuration:!1,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:0.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",
26
+ unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",playbackRateBar:".jp-playback-rate-bar",playbackRateBarValue:".jp-playback-rate-bar-value",currentTime:".jp-current-time",duration:".jp-duration",title:".jp-title",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,
27
+ fadeIn:200,fadeOut:600,hold:1E3},loop:!1,repeat:function(a){a.jPlayer.options.loop?b(this).unbind(".jPlayerRepeat").bind(b.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){b(this).jPlayer("play")}):b(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/},
28
+ noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/,playbook:/playbook/},timeFormat:{},keyEnabled:!1,audioFullScreen:!1,keyBindings:{play:{key:32,fn:function(a){a.status.paused?a.play():a.pause()}},fullScreen:{key:13,fn:function(a){(a.status.video||a.options.audioFullScreen)&&a._setOption("fullScreen",!a.options.fullScreen)}},muted:{key:8,fn:function(a){a._muted(!a.options.muted)}},
29
+ volumeUp:{key:38,fn:function(a){a.volume(a.options.volume+0.1)}},volumeDown:{key:40,fn:function(a){a.volume(a.options.volume-0.1)}}},verticalVolume:!1,verticalPlaybackRate:!1,globalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,consoleAlerts:!0,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",
30
+ cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,remaining:0,videoWidth:0,videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,flash:!0},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,
31
+ media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},
32
+ rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",
33
+ flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=b.extend({},this.status);this.internal=b.extend({},this.internal);this.options.timeFormat=b.extend({},b.jPlayer.timeFormat,this.options.timeFormat);this.internal.cmdsIgnored=b.jPlayer.platform.ipad||b.jPlayer.platform.iphone||b.jPlayer.platform.ipod;this.internal.domNode=this.element.get(0);this.options.keyEnabled&&!b.jPlayer.focus&&(b.jPlayer.focus=
34
+ this);this.androidFix={setMedia:!1,play:!1,pause:!1,time:NaN};b.jPlayer.platform.android&&(this.options.preload="auto"!==this.options.preload?"metadata":"auto");this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);b.each(this.options.supplied.toLowerCase().split(","),function(c,d){var e=d.replace(/^\s+|\s+$/g,
35
+ "");if(a.format[e]){var f=!1;b.each(a.formats,function(a,c){if(e===c)return f=!0,!1});f||a.formats.push(e)}});b.each(this.options.solution.toLowerCase().split(","),function(c,d){var e=d.replace(/^\s+|\s+$/g,"");if(a.solution[e]){var f=!1;b.each(a.solutions,function(a,c){if(e===c)return f=!0,!1});f||a.solutions.push(e)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);
36
+ this.internal.self=b.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=b.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:f});this.internal.video=b.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:f});this.internal.flash=b.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:f,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"Jplayer.swf":"")});
37
+ this.internal.poster=b.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:f});b.each(b.jPlayer.event,function(c,b){a.options[c]!==f&&(a.element.bind(b+".jPlayer",a.options[c]),a.options[c]=f)});this.require.audio=!1;this.require.video=!1;b.each(this.formats,function(c,b){a.require[a.format[b].media]=!0});this.options=this.require.video?b.extend(!0,{},this.optionsVideo,this.options):b.extend(!0,{},this.optionsAudio,this.options);this._setSize();this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);
38
+ this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow);this.status.noVolume=this._uaBlocklist(this.options.noVolume);b.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners();this._restrictNativeVideoControls();this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){a.status.video&&!a.status.waitForPlay||a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);
39
+ this.internal.poster.jq=b("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.internal.poster.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)});this.html.audio.available=!1;this.require.audio&&(this.htmlElement.audio=document.createElement("audio"),this.htmlElement.audio.id=this.internal.audio.id,this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio));
40
+ this.html.video.available=!1;this.require.video&&(this.htmlElement.video=document.createElement("video"),this.htmlElement.video.id=this.internal.video.id,this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video));this.flash.available=this._checkForFlash(10.1);this.html.canPlay={};this.flash.canPlay={};b.each(this.formats,function(c,b){a.html.canPlay[b]=a.html[a.format[b].media].available&&""!==a.htmlElement[a.format[b].media].canPlayType(a.format[b].codec);
41
+ a.flash.canPlay[b]=a.format[b].flashCanPlay&&a.flash.available});this.html.desired=!1;this.flash.desired=!1;b.each(this.solutions,function(c,d){if(0===c)a[d].desired=!0;else{var e=!1,f=!1;b.each(a.formats,function(c,b){a[a.solutions[0]].canPlay[b]&&("video"===a.format[b].media?f=!0:e=!0)});a[d].desired=a.require.audio&&!e||a.require.video&&!f}});this.html.support={};this.flash.support={};b.each(this.formats,function(c,b){a.html.support[b]=a.html.canPlay[b]&&a.html.desired;a.flash.support[b]=a.flash.canPlay[b]&&
42
+ a.flash.desired});this.html.used=!1;this.flash.used=!1;b.each(this.solutions,function(c,d){b.each(a.formats,function(c,b){if(a[d].support[b])return a[d].used=!0,!1})});this._resetActive();this._resetGate();this._cssSelectorAncestor(this.options.cssSelectorAncestor);this.html.used||this.flash.used?this.css.jq.noSolution.length&&this.css.jq.noSolution.hide():(this._error({type:b.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SOLUTION,
43
+ hint:b.jPlayer.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show());if(this.flash.used){var c,d="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(b.jPlayer.browser.msie&&(9>Number(b.jPlayer.browser.version)||9>b.jPlayer.browser.documentMode)){d=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+d+'" />','<param name="allowScriptAccess" value="always" />',
44
+ '<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];c=document.createElement('<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0" tabindex="-1"></object>');for(var e=0;e<d.length;e++)c.appendChild(document.createElement(d[e]))}else e=function(a,c,b){var d=document.createElement("param");d.setAttribute("name",c);d.setAttribute("value",b);a.appendChild(d)},c=document.createElement("object"),
45
+ c.setAttribute("id",this.internal.flash.id),c.setAttribute("name",this.internal.flash.id),c.setAttribute("data",this.internal.flash.swf),c.setAttribute("type","application/x-shockwave-flash"),c.setAttribute("width","1"),c.setAttribute("height","1"),c.setAttribute("tabindex","-1"),e(c,"flashvars",d),e(c,"allowscriptaccess","always"),e(c,"bgcolor",this.options.backgroundColor),e(c,"wmode",this.options.wmode);this.element.append(c);this.internal.flash.jq=b(c)}this.status.playbackRateEnabled=this.html.used&&
46
+ !this.flash.used?this._testPlaybackRate("audio"):!1;this._updatePlaybackRate();this.html.used&&(this.html.audio.available&&(this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio),this.element.append(this.htmlElement.audio),this.internal.audio.jq=b("#"+this.internal.audio.id)),this.html.video.available&&(this._addHtmlEventListeners(this.htmlElement.video,this.html.video),this.element.append(this.htmlElement.video),this.internal.video.jq=b("#"+this.internal.video.id),this.status.nativeVideoControls?
47
+ this.internal.video.jq.css({width:this.status.width,height:this.status.height}):this.internal.video.jq.css({width:"0px",height:"0px"}),this.internal.video.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)})));this.options.emulateHtml&&this._emulateHtmlBridge();this.html.used&&!this.flash.used&&setTimeout(function(){a.internal.ready=!0;a.version.flash="n/a";a._trigger(b.jPlayer.event.repeat);a._trigger(b.jPlayer.event.ready)},100);this._updateNativeVideoControls();this.css.jq.videoPlay.length&&
48
+ this.css.jq.videoPlay.hide();b.jPlayer.prototype.count++},destroy:function(){this.clearMedia();this._removeUiClass();this.css.jq.currentTime.length&&this.css.jq.currentTime.text("");this.css.jq.duration.length&&this.css.jq.duration.text("");b.each(this.css.jq,function(a,c){c.length&&c.unbind(".jPlayer")});this.internal.poster.jq.unbind(".jPlayer");this.internal.video.jq&&this.internal.video.jq.unbind(".jPlayer");this._fullscreenRemoveEventListeners();this===b.jPlayer.focus&&(b.jPlayer.focus=null);
49
+ this.options.emulateHtml&&this._destroyHtmlBridge();this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();delete this.instances[this.internal.instance]},enable:function(){},disable:function(){},_testCanPlayType:function(a){try{return a.canPlayType(this.format.mp3.codec),!0}catch(c){return!1}},_testPlaybackRate:function(a){a=document.createElement("string"===typeof a?a:"audio");try{return"playbackRate"in a?(a.playbackRate=0.5,0.5===a.playbackRate):!1}catch(c){return!1}},
50
+ _uaBlocklist:function(a){var c=navigator.userAgent.toLowerCase(),d=!1;b.each(a,function(a,b){if(b&&b.test(c))return d=!0,!1});return d},_restrictNativeVideoControls:function(){this.require.audio&&this.status.nativeVideoControls&&(this.status.nativeVideoControls=!1,this.status.noFullWindow=!0)},_updateNativeVideoControls:function(){this.html.video.available&&this.html.used&&(this.htmlElement.video.controls=this.status.nativeVideoControls,this._updateAutohide(),this.status.nativeVideoControls&&this.require.video?
51
+ (this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})):this.status.waitForPlay&&this.status.video&&(this.internal.poster.jq.show(),this.internal.video.jq.css({width:"0px",height:"0px"})))},_addHtmlEventListeners:function(a,c){var d=this;a.preload=this.options.preload;a.muted=this.options.muted;a.volume=this.options.volume;this.status.playbackRateEnabled&&(a.defaultPlaybackRate=this.options.defaultPlaybackRate,a.playbackRate=this.options.playbackRate);
52
+ a.addEventListener("progress",function(){c.gate&&(d.internal.cmdsIgnored&&0<this.readyState&&(d.internal.cmdsIgnored=!1),d.androidFix.setMedia=!1,d.androidFix.play&&(d.androidFix.play=!1,d.play(d.androidFix.time)),d.androidFix.pause&&(d.androidFix.pause=!1,d.pause(d.androidFix.time)),d._getHtmlStatus(a),d._updateInterface(),d._trigger(b.jPlayer.event.progress))},!1);a.addEventListener("timeupdate",function(){c.gate&&(d._getHtmlStatus(a),d._updateInterface(),d._trigger(b.jPlayer.event.timeupdate))},
53
+ !1);a.addEventListener("durationchange",function(){c.gate&&(d._getHtmlStatus(a),d._updateInterface(),d._trigger(b.jPlayer.event.durationchange))},!1);a.addEventListener("play",function(){c.gate&&(d._updateButtons(!0),d._html_checkWaitForPlay(),d._trigger(b.jPlayer.event.play))},!1);a.addEventListener("playing",function(){c.gate&&(d._updateButtons(!0),d._seeked(),d._trigger(b.jPlayer.event.playing))},!1);a.addEventListener("pause",function(){c.gate&&(d._updateButtons(!1),d._trigger(b.jPlayer.event.pause))},
54
+ !1);a.addEventListener("waiting",function(){c.gate&&(d._seeking(),d._trigger(b.jPlayer.event.waiting))},!1);a.addEventListener("seeking",function(){c.gate&&(d._seeking(),d._trigger(b.jPlayer.event.seeking))},!1);a.addEventListener("seeked",function(){c.gate&&(d._seeked(),d._trigger(b.jPlayer.event.seeked))},!1);a.addEventListener("volumechange",function(){c.gate&&(d.options.volume=a.volume,d.options.muted=a.muted,d._updateMute(),d._updateVolume(),d._trigger(b.jPlayer.event.volumechange))},!1);a.addEventListener("ratechange",
55
+ function(){c.gate&&(d.options.defaultPlaybackRate=a.defaultPlaybackRate,d.options.playbackRate=a.playbackRate,d._updatePlaybackRate(),d._trigger(b.jPlayer.event.ratechange))},!1);a.addEventListener("suspend",function(){c.gate&&(d._seeked(),d._trigger(b.jPlayer.event.suspend))},!1);a.addEventListener("ended",function(){c.gate&&(b.jPlayer.browser.webkit||(d.htmlElement.media.currentTime=0),d.htmlElement.media.pause(),d._updateButtons(!1),d._getHtmlStatus(a,!0),d._updateInterface(),d._trigger(b.jPlayer.event.ended))},
56
+ !1);a.addEventListener("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(clearTimeout(d.internal.htmlDlyCmdId),d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:b.jPlayer.error.URL,context:d.status.src,message:b.jPlayer.errorMsg.URL,
57
+ hint:b.jPlayer.errorHint.URL})))},!1);b.each(b.jPlayer.htmlEvent,function(e,g){a.addEventListener(this,function(){c.gate&&d._trigger(b.jPlayer.event[g])},!1)})},_getHtmlStatus:function(a,c){var b=0,e=0,g=0,f=0;isFinite(a.duration)&&(this.status.duration=a.duration);b=a.currentTime;e=0<this.status.duration?100*b/this.status.duration:0;"object"===typeof a.seekable&&0<a.seekable.length?(g=0<this.status.duration?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100,f=0<this.status.duration?
58
+ 100*a.currentTime/a.seekable.end(a.seekable.length-1):0):(g=100,f=e);c&&(e=f=b=0);this.status.seekPercent=g;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=e;this.status.currentTime=b;this.status.remaining=this.status.duration-this.status.currentTime;this.status.videoWidth=a.videoWidth;this.status.videoHeight=a.videoHeight;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate=a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=
59
+ b.extend({},this.status,b.jPlayer.prototype.status)},_trigger:function(a,c,d){a=b.Event(a);a.jPlayer={};a.jPlayer.version=b.extend({},this.version);a.jPlayer.options=b.extend(!0,{},this.options);a.jPlayer.status=b.extend(!0,{},this.status);a.jPlayer.html=b.extend(!0,{},this.html);a.jPlayer.flash=b.extend(!0,{},this.flash);c&&(a.jPlayer.error=b.extend({},c));d&&(a.jPlayer.warning=b.extend({},d));this.element.trigger(a)},jPlayerFlashEvent:function(a,c){if(a===b.jPlayer.event.ready)if(!this.internal.ready)this.internal.ready=
60
+ !0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=c.version,this.version.needFlash!==this.version.flash&&this._error({type:b.jPlayer.error.VERSION,context:this.version.flash,message:b.jPlayer.errorMsg.VERSION+this.version.flash,hint:b.jPlayer.errorHint.VERSION}),this._trigger(b.jPlayer.event.repeat),this._trigger(a);else if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);this.volumeWorker(this.options.volume);
61
+ 0<d&&(e?this.pause(d):this.play(d))}this._trigger(b.jPlayer.event.flashreset)}if(this.flash.gate)switch(a){case b.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.timeupdate:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.play:this._seeked();this._updateButtons(!0);this._trigger(a);break;case b.jPlayer.event.pause:this._updateButtons(!1);this._trigger(a);break;case b.jPlayer.event.ended:this._updateButtons(!1);
62
+ this._trigger(a);break;case b.jPlayer.event.click:this._trigger(a);break;case b.jPlayer.event.error:this.status.waitForLoad=!0;this.status.waitForPlay=!0;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._updateButtons(!1);
63
+ this._error({type:b.jPlayer.error.URL,context:c.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL});break;case b.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case b.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case b.jPlayer.event.ready:break;default:this._trigger(a)}return!1},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;
64
+ this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.remaining=a.duration-a.currentTime;this.status.videoWidth=a.videoWidth;this.status.videoHeight=a.videoHeight;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=!1},_updateButtons:function(a){a===f?a=!this.status.paused:this.status.paused=!a;this.css.jq.play.length&&this.css.jq.pause.length&&(a?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide()));
65
+ this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&&(this.status.noFullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide()));this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(this.css.jq.repeat.show(),this.css.jq.repeatOff.hide()))},
66
+ _updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&(this.options.smoothPlayBar?this.css.jq.playBar.stop().animate({width:this.status.currentPercentAbsolute+"%"},250,"linear"):this.css.jq.playBar.width(this.status.currentPercentRelative+"%"));var a="";this.css.jq.currentTime.length&&(a=this._convertTime(this.status.currentTime),a!==this.css.jq.currentTime.text()&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)));
67
+ var a="",a=this.status.duration,c=this.status.remaining;this.css.jq.duration.length&&("string"===typeof this.status.media.duration?a=this.status.media.duration:("number"===typeof this.status.media.duration&&(a=this.status.media.duration,c=a-this.status.currentTime),a=this.options.remainingDuration?(0<c?"-":"")+this._convertTime(c):this._convertTime(a)),a!==this.css.jq.duration.text()&&this.css.jq.duration.text(a))},_convertTime:l.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},
68
+ _seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},_resetGate:function(){this.html.audio.gate=!1;this.html.video.gate=!1;this.flash.gate=!1},_resetActive:function(){this.html.active=!1;this.flash.active=!1},_escapeHtml:function(a){return a.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")},_qualifyURL:function(a){var c=document.createElement("div");c.innerHTML='<a href="'+this._escapeHtml(a)+'">x</a>';return c.firstChild.href},
69
+ _absoluteMediaUrls:function(a){var c=this;b.each(a,function(b,e){e&&c.format[b]&&(a[b]=c._qualifyURL(e))});return a},setMedia:function(a){var c=this,d=!1,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();this.androidFix.setMedia=!1;this.androidFix.play=!1;this.androidFix.pause=!1;a=this._absoluteMediaUrls(a);b.each(this.formats,function(e,f){var k="video"===c.format[f].media;b.each(c.solutions,function(e,g){if(c[g].support[f]&&c._validString(a[f])){var l=
70
+ "html"===g;k?(l?(c.html.video.gate=!0,c._html_setVideo(a),c.html.active=!0):(c.flash.gate=!0,c._flash_setVideo(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show(),c.status.video=!0):(l?(c.html.audio.gate=!0,c._html_setAudio(a),c.html.active=!0,b.jPlayer.platform.android&&(c.androidFix.setMedia=!0)):(c.flash.gate=!0,c._flash_setAudio(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1);d=!0;return!1}});if(d)return!1});d?(this.status.nativeVideoControls&&
71
+ this.html.video.gate||!this._validString(a.poster)||(e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show()),this.css.jq.title.length&&"string"===typeof a.title&&(this.css.jq.title.html(a.title),this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",a.title),this.htmlElement.video&&this.htmlElement.video.setAttribute("title",a.title)),this.status.srcSet=!0,this.status.media=b.extend({},a),this._updateButtons(!1),this._updateInterface(),this._trigger(b.jPlayer.event.setmedia)):
72
+ this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(!1);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia();this.html.active?this._html_clearMedia():
73
+ this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(b.jPlayer.focus=this)},play:function(a){a="number"===typeof a?a:NaN;this.status.srcSet?(this.focus(),this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a)):this._urlNotSetError("play")},videoPlay:function(){this.play()},
74
+ pause:function(a){a="number"===typeof a?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},tellOthers:function(a,c){var d=this,e="function"===typeof c,g=Array.prototype.slice.call(arguments);"string"===typeof a&&(e&&g.splice(1,1),b.each(this.instances,function(){d.element!==this&&(e&&!c.call(this.data("jPlayer"),d)||this.jPlayer.apply(this,g))}))},pauseOthers:function(a){this.tellOthers("pause",function(){return this.status.srcSet},
75
+ a)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a);this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},a)},mutedWorker:function(a){this.options.muted=
76
+ a;this.html.used&&this._html_setProperty("muted",a);this.flash.used&&this._flash_mute(a);this.html.video.gate||this.html.audio.gate||(this._updateMute(a),this._updateVolume(this.options.volume),this._trigger(b.jPlayer.event.volumechange))},mute:function(a){a=a===f?!0:!!a;this._muted(a)},unmute:function(a){a=a===f?!0:!!a;this._muted(!a)},_updateMute:function(a){a===f&&(a=this.options.muted);this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):
77
+ a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){this.volumeWorker(a);this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_setProperty("volume",a);this.flash.used&&this._flash_volume(a);this.html.video.gate||this.html.audio.gate||(this._updateVolume(a),this._trigger(b.jPlayer.event.volumechange))},
78
+ volumeBar:function(a){if(this.css.jq.volumeBar.length){var c=b(a.currentTarget),d=c.offset(),e=a.pageX-d.left,g=c.width();a=c.height()-a.pageY+d.top;c=c.height();this.options.verticalVolume?this.volume(a/c):this.volume(e/g)}this.options.muted&&this._muted(!1)},_updateVolume:function(a){a===f&&(a=this.options.volume);a=this.options.muted?0:a;this.status.noVolume?(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(),this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&
79
+ this.css.jq.volumeMax.hide()):(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*a+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(a){var c=this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):
80
+ [];a&&1!==this.ancestorJq.length&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)});this._updateInterface();this._updateButtons();this._updateAutohide();this._updateVolume();this._updateMute()},_cssSelector:function(a,c){var d=this;"string"===typeof c?
81
+ b.jPlayer.prototype.options.cssSelector[a]?(this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer"),this.options.cssSelector[a]=c,this.css.cs[a]=this.options.cssSelectorAncestor+" "+c,this.css.jq[a]=c?b(this.css.cs[a]):[],this.css.jq[a].length&&this[a]&&this.css.jq[a].bind("click.jPlayer",function(c){c.preventDefault();d[a](c);b(this).blur()}),c&&1!==this.css.jq[a].length&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+
82
+ this.css.jq[a].length+" found for "+a+" method.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD}):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})},duration:function(a){this.options.toggleDuration&&this._setOption("remainingDuration",
83
+ !this.options.remainingDuration)},seekBar:function(a){if(this.css.jq.seekBar.length){var c=b(a.currentTarget),d=c.offset();a=a.pageX-d.left;c=c.width();this.playHead(100*a/c)}},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(a){if(this.css.jq.playbackRateBar.length){var c=b(a.currentTarget),d=c.offset(),e=a.pageX-d.left,g=c.width();a=c.height()-a.pageY+d.top;c=c.height();this.playbackRate((this.options.verticalPlaybackRate?a/c:e/g)*(this.options.maxPlaybackRate-
84
+ this.options.minPlaybackRate)+this.options.minPlaybackRate)}},_updatePlaybackRate:function(){var a=(this.options.playbackRate-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(),this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*a+"%"))):(this.css.jq.playbackRateBar.length&&
85
+ this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(){this._loop(!0)},repeatOff:function(){this._loop(!1)},_loop:function(a){this.options.loop!==a&&(this.options.loop=a,this._updateButtons(),this._trigger(b.jPlayer.event.repeat))},option:function(a,c){var d=a;if(0===arguments.length)return b.extend(!0,{},this.options);if("string"===typeof a){var e=a.split(".");if(c===f){for(var d=b.extend(!0,{},this.options),g=0;g<e.length;g++)if(d[e[g]]!==
86
+ f)d=d[e[g]];else return this._warning({type:b.jPlayer.warning.OPTION_KEY,context:a,message:b.jPlayer.warningMsg.OPTION_KEY,hint:b.jPlayer.warningHint.OPTION_KEY}),f;return d}for(var g=d={},h=0;h<e.length;h++)h<e.length-1?(g[e[h]]={},g=g[e[h]]):g[e[h]]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,c){var d=this;switch(a){case "volume":this.volume(c);break;case "muted":this._muted(c);break;case "globalVolume":this.options[a]=
87
+ c;break;case "cssSelectorAncestor":this._cssSelectorAncestor(c);break;case "cssSelector":b.each(c,function(a,c){d._cssSelector(a,c)});break;case "playbackRate":this.options[a]=c=this._limitValue(c,this.options.minPlaybackRate,this.options.maxPlaybackRate);this.html.used&&this._html_setProperty("playbackRate",c);this._updatePlaybackRate();break;case "defaultPlaybackRate":this.options[a]=c=this._limitValue(c,this.options.minPlaybackRate,this.options.maxPlaybackRate);this.html.used&&this._html_setProperty("defaultPlaybackRate",
88
+ c);this._updatePlaybackRate();break;case "minPlaybackRate":this.options[a]=c=this._limitValue(c,0.1,this.options.maxPlaybackRate-0.1);this._updatePlaybackRate();break;case "maxPlaybackRate":this.options[a]=c=this._limitValue(c,this.options.minPlaybackRate+0.1,16);this._updatePlaybackRate();break;case "fullScreen":if(this.options[a]!==c){var e=b.jPlayer.nativeFeatures.fullscreen.used.webkitVideo;if(!e||e&&!this.status.waitForPlay)e||(this.options[a]=c),c?this._requestFullscreen():this._exitFullscreen(),
89
+ e||this._setOption("fullWindow",c)}break;case "fullWindow":this.options[a]!==c&&(this._removeUiClass(),this.options[a]=c,this._refreshSize());break;case "size":this.options.fullWindow||this.options[a].cssClass===c.cssClass||this._removeUiClass();this.options[a]=b.extend({},this.options[a],c);this._refreshSize();break;case "sizeFull":this.options.fullWindow&&this.options[a].cssClass!==c.cssClass&&this._removeUiClass();this.options[a]=b.extend({},this.options[a],c);this._refreshSize();break;case "autohide":this.options[a]=
90
+ b.extend({},this.options[a],c);this._updateAutohide();break;case "loop":this._loop(c);break;case "remainingDuration":this.options[a]=c;this._updateInterface();break;case "toggleDuration":this.options[a]=c;break;case "nativeVideoControls":this.options[a]=b.extend({},this.options[a],c);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this._restrictNativeVideoControls();this._updateNativeVideoControls();break;case "noFullWindow":this.options[a]=b.extend({},this.options[a],
91
+ c);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow);this._restrictNativeVideoControls();this._updateButtons();break;case "noVolume":this.options[a]=b.extend({},this.options[a],c);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._updateVolume();this._updateMute();break;case "emulateHtml":this.options[a]!==c&&((this.options[a]=c)?this._emulateHtmlBridge():this._destroyHtmlBridge());
92
+ break;case "timeFormat":this.options[a]=b.extend({},this.options[a],c);break;case "keyEnabled":this.options[a]=c;c||this!==b.jPlayer.focus||(b.jPlayer.focus=null);break;case "keyBindings":this.options[a]=b.extend(!0,{},this.options[a],c);break;case "audioFullScreen":this.options[a]=c}return this},_refreshSize:function(){this._setSize();this._addUiClass();this._updateSize();this._updateButtons();this._updateAutohide();this._trigger(b.jPlayer.event.resize)},_setSize:function(){this.options.fullWindow?
93
+ (this.status.width=this.options.sizeFull.width,this.status.height=this.options.sizeFull.height,this.status.cssClass=this.options.sizeFull.cssClass):(this.status.width=this.options.size.width,this.status.height=this.options.size.height,this.status.cssClass=this.options.size.cssClass);this.element.css({width:this.status.width,height:this.status.height})},_addUiClass:function(){this.ancestorJq.length&&this.ancestorJq.addClass(this.status.cssClass)},_removeUiClass:function(){this.ancestorJq.length&&this.ancestorJq.removeClass(this.status.cssClass)},
94
+ _updateSize:function(){this.internal.poster.jq.css({width:this.status.width,height:this.status.height});!this.status.waitForPlay&&this.html.active&&this.status.video||this.html.video.available&&this.html.used&&this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):!this.status.waitForPlay&&this.flash.active&&this.status.video&&this.internal.flash.jq.css({width:this.status.width,height:this.status.height})},_updateAutohide:function(){var a=this,
95
+ c=function(){a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId);a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},a.options.autohide.hold)})};this.css.jq.gui.length&&(this.css.jq.gui.stop(!0,!0),clearTimeout(this.internal.autohideId),this.element.unbind(".jPlayerAutohide"),this.css.jq.gui.unbind(".jPlayerAutohide"),this.status.nativeVideoControls?this.css.jq.gui.hide():this.options.fullWindow&&this.options.autohide.full||
96
+ !this.options.fullWindow&&this.options.autohide.restored?(this.element.bind("mousemove.jPlayer.jPlayerAutohide",c),this.css.jq.gui.bind("mousemove.jPlayer.jPlayerAutohide",c),this.css.jq.gui.hide()):this.css.jq.gui.show())},fullScreen:function(){this._setOption("fullScreen",!0)},restoreScreen:function(){this._setOption("fullScreen",!1)},_fullscreenAddEventListeners:function(){var a=this,c=b.jPlayer.nativeFeatures.fullscreen;c.api.fullscreenEnabled&&c.event.fullscreenchange&&("function"!==typeof this.internal.fullscreenchangeHandler&&
97
+ (this.internal.fullscreenchangeHandler=function(){a._fullscreenchange()}),document.addEventListener(c.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1))},_fullscreenRemoveEventListeners:function(){var a=b.jPlayer.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.removeEventListener(a.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1)},_fullscreenchange:function(){this.options.fullScreen&&!b.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()&&
98
+ this._setOption("fullScreen",!1)},_requestFullscreen:function(){var a=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],c=b.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(a=this.htmlElement.video);c.api.fullscreenEnabled&&c.api.requestFullscreen(a)},_exitFullscreen:function(){var a=b.jPlayer.nativeFeatures.fullscreen,c;a.used.webkitVideo&&(c=this.htmlElement.video);a.api.fullscreenEnabled&&a.api.exitFullscreen(c)},_html_initMedia:function(a){var c=b(this.htmlElement.media).empty();
99
+ b.each(a.track||[],function(a,b){var g=document.createElement("track");g.setAttribute("kind",b.kind?b.kind:"");g.setAttribute("src",b.src?b.src:"");g.setAttribute("srclang",b.srclang?b.srclang:"");g.setAttribute("label",b.label?b.label:"");b.def&&g.setAttribute("default",b.def);c.append(g)});this.htmlElement.media.src=this.status.src;"none"!==this.options.preload&&this._html_load();this._trigger(b.jPlayer.event.timeupdate)},_html_setFormat:function(a){var c=this;b.each(this.formats,function(b,e){if(c.html.support[e]&&
100
+ a[e])return c.status.src=a[e],c.status.format[e]=!0,c.status.formatType=e,!1})},_html_setAudio:function(a){this._html_setFormat(a);this.htmlElement.media=this.htmlElement.audio;this._html_initMedia(a)},_html_setVideo:function(a){this._html_setFormat(a);this.status.nativeVideoControls&&(this.htmlElement.video.poster=this._validString(a.poster)?a.poster:"");this.htmlElement.media=this.htmlElement.video;this._html_initMedia(a)},_html_resetMedia:function(){this.htmlElement.media&&(this.htmlElement.media.id!==
101
+ this.internal.video.id||this.status.nativeVideoControls||this.internal.video.jq.css({width:"0px",height:"0px"}),this.htmlElement.media.pause())},_html_clearMedia:function(){this.htmlElement.media&&(this.htmlElement.media.src="about:blank",this.htmlElement.media.load())},_html_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.htmlElement.media.load());clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this,d=this.htmlElement.media;this.androidFix.pause=!1;
102
+ this._html_load();if(this.androidFix.setMedia)this.androidFix.play=!0,this.androidFix.time=a;else if(isNaN(a))d.play();else{this.internal.cmdsIgnored&&d.play();try{if(!d.seekable||"object"===typeof d.seekable&&0<d.seekable.length)d.currentTime=a,d.play();else throw 1;}catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},250);return}}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this,d=this.htmlElement.media;this.androidFix.play=!1;0<a?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);
103
+ d.pause();if(this.androidFix.setMedia)this.androidFix.pause=!0,this.androidFix.time=a;else if(!isNaN(a))try{if(!d.seekable||"object"===typeof d.seekable&&0<d.seekable.length)d.currentTime=a;else throw 1;}catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},250);return}0<a&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this,d=this.htmlElement.media;this._html_load();try{if("object"===typeof d.seekable&&0<d.seekable.length)d.currentTime=a*d.seekable.end(d.seekable.length-
104
+ 1)/100;else if(0<d.duration&&!isNaN(d.duration))d.currentTime=a*d.duration/100;else throw"e";}catch(e){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},250);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})))},
105
+ _html_setProperty:function(a,b){this.html.audio.available&&(this.htmlElement.audio[a]=b);this.html.video.available&&(this.htmlElement.video[a]=b)},_flash_setAudio:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4a":case "fla":c._getMovie().fl_setAudio_m4a(a[d]);break;case "mp3":c._getMovie().fl_setAudio_mp3(a[d]);break;case "rtmpa":c._getMovie().fl_setAudio_rtmp(a[d])}c.status.src=a[d];c.status.format[d]=!0;c.status.formatType=d;return!1}}),
106
+ "auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4v":case "flv":c._getMovie().fl_setVideo_m4v(a[d]);break;case "rtmpv":c._getMovie().fl_setVideo_rtmp(a[d])}c.status.src=a[d];c.status.format[d]=!0;c.status.formatType=d;return!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},
107
+ _flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=!1},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=!1;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}0<
108
+ a&&(this.status.waitForLoad=!1,this._flash_checkWaitForPlay())},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height})))},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},
109
+ _flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_getFlashPluginVersion:function(){var a=0,b;if(window.ActiveXObject)try{if(b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var d=b.GetVariable("$version");d&&(d=d.split(" ")[1].split(","),a=parseInt(d[0],10)+"."+parseInt(d[1],10))}}catch(e){}else navigator.plugins&&0<navigator.mimeTypes.length&&(b=navigator.plugins["Shockwave Flash"])&&(a=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,
110
+ "$1"));return 1*a},_checkForFlash:function(a){var b=!1;this._getFlashPluginVersion()>=a&&(b=!0);return b},_validString:function(a){return a&&"string"===typeof a},_limitValue:function(a,b,d){return a<b?b:a>d?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c],context:this.internal.flash.swf,
111
+ message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},
112
+ _alert:function(a){a="jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a;this.options.consoleAlerts?window.console&&window.console.log&&window.console.log(a):alert(a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=!0;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=!1});e&&a.element.bind(d+".jPlayer.jPlayerHtml",
113
+ function(){a._emulateHtmlUpdate();var b=document.createEvent("Event");b.initEvent(c,!1,!0);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+
114
+ " "+b.jPlayer.emulateOptions).split(/\s+/g),function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",
115
+ NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint=
116
+ {FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",
117
+ CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",
118
+ CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}});
js/{mp3-jplayer-1.8.5.js → mp3-jplayer-1.8.8.js} RENAMED
@@ -1,5 +1,5 @@
1
  /*
2
- MP3-jPlayer 1.8.5
3
  www.sjward.org
4
  */
5
 
@@ -80,7 +80,7 @@ var MP3_JPLAYER = {
80
  that.startup();
81
  },
82
  //swfPath: that.plugin_path + '/js',
83
- swfPath: that.plugin_path + '/js/Jplayer2-5-0.swf',
84
  volume: 1,
85
  supplied: "mp3",
86
  wmode: "window",
@@ -225,7 +225,8 @@ var MP3_JPLAYER = {
225
  startup: function () {
226
  var j;
227
  for (j = 0; j < this.pl_info.length; j += 1) {
228
- if (this.pl_info[j].autoplay) {
 
229
  this.pl_info[j].autoplay = false;
230
  this.E_change_track(j, this.pl_info[j].tr);
231
  return;
@@ -469,9 +470,8 @@ var MP3_JPLAYER = {
469
  this.vars.pp_windowheight = this.vars.pp_maxheight;
470
  }
471
  this.launched_ID = j;
472
- if ( this.state === "playing" ) {
473
- this.pl_info[j].autoplay = true;
474
- }
475
  this.E_stop(this.tID);
476
  this.setit(this.plugin_path + '/mp3/silence.mp3');
477
  this.playit(); //make chrome let go of last track (incase it didn't finish loading)
1
  /*
2
+ MP3-jPlayer 1.8.8
3
  www.sjward.org
4
  */
5
 
80
  that.startup();
81
  },
82
  //swfPath: that.plugin_path + '/js',
83
+ swfPath: that.plugin_path + '/js/Jplayer2-6-0.swf',
84
  volume: 1,
85
  supplied: "mp3",
86
  wmode: "window",
225
  startup: function () {
226
  var j;
227
  for (j = 0; j < this.pl_info.length; j += 1) {
228
+ //if (this.pl_info[j].autoplay) {
229
+ if ( this.pl_info[j].autoplay && (this.pl_info[j].type === 'single' || this.pl_info[j].type === 'MI') ) {
230
  this.pl_info[j].autoplay = false;
231
  this.E_change_track(j, this.pl_info[j].tr);
232
  return;
470
  this.vars.pp_windowheight = this.vars.pp_maxheight;
471
  }
472
  this.launched_ID = j;
473
+ this.was_playing = ( this.state === "playing" ) ? true : false;
474
+
 
475
  this.E_stop(this.tID);
476
  this.setit(this.plugin_path + '/mp3/silence.mp3');
477
  this.playit(); //make chrome let go of last track (incase it didn't finish loading)
mp3j_admin.php CHANGED
@@ -2,130 +2,164 @@
2
  function mp3j_print_admin_page() {
3
 
4
  global $mp3_fox;
5
- $theOptions = $mp3_fox->getAdminOptions();
6
  $colours_array = array();
7
 
8
- if (isset($_POST['update_mp3foxSettings']))
9
  {
 
 
10
  if (isset($_POST['mp3foxVol'])) {
11
- $theOptions['initial_vol'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxVol']);
12
- if ($theOptions['initial_vol'] < 0 || $theOptions['initial_vol']=="") { $theOptions['initial_vol'] = "0"; }
13
- if ($theOptions['initial_vol'] > 100) { $theOptions['initial_vol'] = "100"; }
14
  }
15
  if (isset($_POST['mp3foxPopoutMaxHeight'])) {
16
- $theOptions['popout_max_height'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxPopoutMaxHeight']);
17
- if ( $theOptions['popout_max_height'] == "" ) { $theOptions['popout_max_height'] = "750"; }
18
- if ( $theOptions['popout_max_height'] < 200 ) { $theOptions['popout_max_height'] = "200"; }
19
- if ( $theOptions['popout_max_height'] > 1200 ) { $theOptions['popout_max_height'] = "1200"; }
20
  }
21
  if (isset($_POST['mp3foxPopoutWidth'])) {
22
- $theOptions['popout_width'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxPopoutWidth']);
23
- if ( $theOptions['popout_width'] == "" ) { $theOptions['popout_width'] = "400"; }
24
- if ( $theOptions['popout_width'] < 250 ) { $theOptions['popout_width'] = "250"; }
25
- if ( $theOptions['popout_width'] > 1600 ) { $theOptions['popout_width'] = "1600"; }
26
  }
27
  if (isset($_POST['mp3foxMaxListHeight'])) {
28
- $theOptions['max_list_height'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxMaxListHeight']);
29
- if ( $theOptions['max_list_height'] < 0 ) { $theOptions['max_list_height'] = ""; }
 
 
 
 
 
 
 
 
 
 
 
30
  }
31
 
32
- if (isset($_POST['mp3foxfolder'])) { $theOptions['mp3_dir'] = $mp3_fox->prep_path( $_POST['mp3foxfolder'] ); }
33
- if (isset($_POST['mp3foxCustomStylesheet'])) { $theOptions['custom_stylesheet'] = $mp3_fox->prep_path( $_POST['mp3foxCustomStylesheet'] ); }
34
- if (isset($_POST['mp3foxTheme'])) { $theOptions['player_theme'] = $_POST['mp3foxTheme']; }
35
- if (isset($_POST['mp3foxFloat'])) { $theOptions['player_float'] = $_POST['mp3foxFloat']; }
36
- if (isset($_POST['mp3foxPlayerWidth'])) { $theOptions['player_width'] = $_POST['mp3foxPlayerWidth']; }
37
- if (isset($_POST['mp3foxPopoutBackground'])) { $theOptions['popout_background'] = $_POST['mp3foxPopoutBackground']; }
38
- if (isset($_POST['mp3foxPopoutBGimage'])) { $theOptions['popout_background_image'] = $_POST['mp3foxPopoutBGimage']; }
39
- if (isset($_POST['mp3foxPluginVersion'])) { $theOptions['db_plugin_version'] = $_POST['mp3foxPluginVersion']; }
40
- if (isset($_POST['mp3foxPopoutButtonText'])) { $theOptions['popout_button_title'] = $_POST['mp3foxPopoutButtonText']; }
41
- if (isset($_POST['librarySortcol'])) { $theOptions['library_sortcol'] = $_POST['librarySortcol']; }
42
- if (isset($_POST['libraryDirection'])) { $theOptions['library_direction'] = $_POST['libraryDirection']; }
43
- if (isset($_POST['disableJSlibs'])) { $theOptions['disable_jquery_libs'] = ( preg_match("/^yes$/i", $_POST['disableJSlibs']) ) ? "yes" : ""; }
44
- if (isset($_POST['MtogBox1'])) { $theOptions['admin_toggle_1'] = $_POST['MtogBox1']; }
45
- if (isset($_POST['file_separator'])) { $theOptions['f_separator'] = $_POST['file_separator']; }
46
- if (isset($_POST['caption_separator'])) { $theOptions['c_separator'] = $_POST['caption_separator']; }
47
-
48
 
49
- $theOptions['paddings_top'] = ( $_POST['mp3foxPaddings_top'] == "" ) ? "0px" : $_POST['mp3foxPaddings_top'];
50
- $theOptions['paddings_bottom'] = ( $_POST['mp3foxPaddings_bottom'] == "" ) ? "0px" : $_POST['mp3foxPaddings_bottom'];
51
- $theOptions['paddings_inner'] = ( $_POST['mp3foxPaddings_inner'] == "" ) ? "0px" : $_POST['mp3foxPaddings_inner'];
52
- $theOptions['auto_play'] = (isset($_POST['mp3foxAutoplay'])) ? $_POST['mp3foxAutoplay'] : "false";
53
- $theOptions['allow_remoteMp3'] = (isset($_POST['mp3foxAllowRemote'])) ? $_POST['mp3foxAllowRemote'] : "false";
54
- //$theOptions['playlist_AtoZ'] = (isset($_POST['mp3foxAtoZ'])) ? $_POST['mp3foxAtoZ'] : "false";
55
- $theOptions['player_onblog'] = (isset($_POST['mp3foxOnBlog'])) ? $_POST['mp3foxOnBlog'] : "false";
56
- //$theOptions['playlist_UseLibrary'] = (isset($_POST['mp3foxUseLibrary'])) ? $_POST['mp3foxUseLibrary'] : "false";
57
- $theOptions['playlist_show'] = (isset($_POST['mp3foxShowPlaylist'])) ? $_POST['mp3foxShowPlaylist'] : "false";
58
- $theOptions['remember_settings'] = (isset($_POST['mp3foxRemember'])) ? $_POST['mp3foxRemember'] : "false";
59
- $theOptions['hide_mp3extension'] = (isset($_POST['mp3foxHideExtension'])) ? $_POST['mp3foxHideExtension'] : "false";
 
 
 
 
 
 
 
 
 
 
 
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
- //$theOptions['show_downloadmp3'] = (isset($_POST['mp3foxDownloadMp3'])) ? $_POST['mp3foxDownloadMp3'] : "false";
63
- if (isset($_POST['mp3foxDownloadMp3'])) { $theOptions['show_downloadmp3'] = $_POST['mp3foxDownloadMp3']; }
64
- $theOptions['dload_text'] = ( $_POST['dload_text'] == "" ) ? "DOWNLOAD MP3" : $_POST['dload_text'];
 
 
 
 
65
 
66
- //$theOptions['loggedout_dload_text'] = ( $_POST['loggedout_dload_text'] == "" ) ? "LOG IN TO DOWNLOAD!" : $_POST['loggedout_dload_text'];
67
- $theOptions['loggedout_dload_text'] = ( $_POST['loggedout_dload_text'] == "" ) ? "" : $_POST['loggedout_dload_text'];
68
- $theOptions['loggedout_dload_link'] = ( $_POST['loggedout_dload_link'] == "" ) ? "" : $_POST['loggedout_dload_link']; //allow it to be empty
69
 
70
- $theOptions['disable_template_tag'] = (isset($_POST['disableTemplateTag'])) ? $_POST['disableTemplateTag'] : "false";
71
- $theOptions['echo_debug'] = (isset($_POST['mp3foxEchoDebug'])) ? $_POST['mp3foxEchoDebug'] : "false";
72
- $theOptions['add_track_numbering'] = (isset($_POST['mp3foxAddTrackNumbers'])) ? $_POST['mp3foxAddTrackNumbers'] : "false";
73
- $theOptions['enable_popout'] = (isset($_POST['mp3foxEnablePopout'])) ? $_POST['mp3foxEnablePopout'] : "false";
74
- $theOptions['playlist_repeat'] = (isset($_POST['mp3foxPlaylistRepeat'])) ? $_POST['mp3foxPlaylistRepeat'] : "false";
75
- $theOptions['use_fixed_css'] = (isset($_POST['mp3foxUseFixedCSS'])) ? $_POST['mp3foxUseFixedCSS'] : "false";
76
- $theOptions['encode_files'] = (isset($_POST['mp3foxEncodeFiles'])) ? $_POST['mp3foxEncodeFiles'] : "false";
77
- $theOptions['animate_sliders'] = (isset($_POST['mp3foxAnimSliders'])) ? $_POST['mp3foxAnimSliders'] : "false";
78
- $theOptions['run_shcode_in_excerpt'] = (isset($_POST['runShcodeInExcerpt'])) ? $_POST['runShcodeInExcerpt'] : "false";
79
- $theOptions['volslider_on_singles'] = (isset($_POST['volslider_onsingles'])) ? $_POST['volslider_onsingles'] : "false";
80
- $theOptions['volslider_on_mp3j'] = (isset($_POST['volslider_onmp3j'])) ? $_POST['volslider_onmp3j'] : "false";
81
- $theOptions['touch_punch_js'] = (isset($_POST['touch_punch_js'])) ? $_POST['touch_punch_js'] : "false";
82
 
83
- $theOptions['force_browser_dload'] = (isset($_POST['force_browser_dload'])) ? $_POST['force_browser_dload'] : "false";
84
- $theOptions['make_player_from_link'] = (isset($_POST['make_player_from_link'])) ? $_POST['make_player_from_link'] : "false";
85
- if (isset($_POST['make_player_from_link_shcode'])) { $theOptions['make_player_from_link_shcode'] = $_POST['make_player_from_link_shcode']; }
86
 
87
- //if (isset($_POST['force_browser_dload_remote'])) { $theOptions['force_browser_dload_remote'] = $_POST['force_browser_dload_remote']; }
 
 
 
 
 
88
 
89
- $theOptions['dloader_remote_path'] = (isset($_POST['dloader_remote_path'])) ? $_POST['dloader_remote_path'] : "";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
- // Colours array//
92
- if (isset($_POST['mp3foxScreenColour'])) { $colours_array['screen_colour'] = $_POST['mp3foxScreenColour']; }
93
- if (isset($_POST['mp3foxScreenOpac'])) { $colours_array['screen_opacity'] = $_POST['mp3foxScreenOpac']; }
94
- if (isset($_POST['mp3foxLoadbarColour'])) { $colours_array['loadbar_colour'] = $_POST['mp3foxLoadbarColour']; }
95
- if (isset($_POST['mp3foxLoadbarOpac'])) { $colours_array['loadbar_opacity'] = $_POST['mp3foxLoadbarOpac']; }
96
- if (isset($_POST['mp3foxPosbarColour'])) { $colours_array['posbar_colour'] = $_POST['mp3foxPosbarColour']; }
97
- if (isset($_POST['mp3foxPosbarTint'])) { $colours_array['posbar_tint'] = $_POST['mp3foxPosbarTint']; }
98
- if (isset($_POST['mp3foxPosbarOpac'])) { $colours_array['posbar_opacity'] = $_POST['mp3foxPosbarOpac']; }
99
- if (isset($_POST['mp3foxScreenTextColour'])) { $colours_array['screen_text_colour'] = $_POST['mp3foxScreenTextColour']; }
100
- if (isset($_POST['mp3foxPlaylistColour'])) { $colours_array['playlist_colour'] = $_POST['mp3foxPlaylistColour']; }
101
- if (isset($_POST['mp3foxPlaylistTint'])) { $colours_array['playlist_tint'] = $_POST['mp3foxPlaylistTint']; }
102
- if (isset($_POST['mp3foxPlaylistOpac'])) { $colours_array['playlist_opacity'] = $_POST['mp3foxPlaylistOpac']; }
103
- if (isset($_POST['mp3foxListTextColour'])) { $colours_array['list_text_colour'] = $_POST['mp3foxListTextColour']; }
104
- if (isset($_POST['mp3foxListCurrentColour'])) { $colours_array['list_current_colour'] = $_POST['mp3foxListCurrentColour']; }
105
- if (isset($_POST['mp3foxListHoverColour'])) { $colours_array['list_hover_colour'] = $_POST['mp3foxListHoverColour']; }
106
- if (isset($_POST['mp3foxListBGaHover'])) { $colours_array['listBGa_hover'] = $_POST['mp3foxListBGaHover']; }
107
- if (isset($_POST['mp3foxListBGaCurrent'])) { $colours_array['listBGa_current'] = $_POST['mp3foxListBGaCurrent']; }
108
- if (isset($_POST['mp3foxVolGrad'])) { $colours_array['volume_grad'] = $_POST['mp3foxVolGrad']; }
109
- if (isset($_POST['mp3foxListDivider'])) { $colours_array['list_divider'] = $_POST['mp3foxListDivider']; }
110
- if (isset($_POST['mp3foxIndicator'])) { $colours_array['indicator'] = $_POST['mp3foxIndicator']; }
111
- $theOptions['colour_settings'] = $colours_array;
112
 
113
- update_option($mp3_fox->adminOptionsName, $theOptions);
114
- $mp3_fox->theSettings = $theOptions;
115
- ?>
116
  <!-- Settings saved message -->
117
  <div class="updated"><p><strong><?php _e("Settings Updated.", $mp3_fox->textdomain );?></strong></p></div>
118
 
119
  <?php
120
  }
121
  // Pick up current colours
122
- $current_colours = $theOptions['colour_settings'];
123
  ?>
124
 
125
  <div class="wrap">
126
  <h2>&nbsp;</h2>
127
  <h1>MP3<span style="font-size:16px;"> - </span>jPlayer<span class="description" style="font-size:10px;">&nbsp; <?php echo $mp3_fox->version_of_plugin; ?></span> &nbsp;&nbsp;
128
- <?php if ( $theOptions['disable_jquery_libs'] == "yes" ) { ?><span style="font-size: 11px; font-weight:700; color:#f66;">(jQuery and UI scripts are turned off)</span><?php } ?></h1>
129
 
130
  <h5 style="margin: 0 0 30px 0; padding:0; font-size:10px;">
131
  <a href="javascript:MP3J_ADMIN.toggleit('tog_0','HELP');" id="tog_0-toggle" class="fox_buttonlink">HELP</a>&nbsp;<a href="widgets.php" class="fox_buttonlink">WIDGETS</a>
@@ -291,40 +325,39 @@
291
  </div>
292
 
293
  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
294
- <p class="jtext">Initial volume &nbsp; <input type="text" style="text-align:center;" size="2" name="mp3foxVol" value="<?php echo $theOptions['initial_vol']; ?>" /> &nbsp; <span class="description">(0 - 100)</span></p>
295
- <p class="jtick"><input type="checkbox" name="mp3foxAutoplay" value="true" <?php if ($theOptions['auto_play'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Autoplay</p>
296
- <p class="jtick"><input type="checkbox" name="mp3foxPlaylistRepeat" value="true" <?php if ($theOptions['playlist_repeat'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Loop</p>
297
- <p class="jtick"><input type="checkbox" name="mp3foxAddTrackNumbers" value="true" <?php if ($theOptions['add_track_numbering'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Number the tracks</p>
298
- <!--<p class="jtick"><input type="checkbox" name="mp3foxAnimSliders" value="true" <?php //if ($theOptions['animate_sliders'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Animate sliders</p>-->
299
 
300
  <br />
301
- <p class="jtick"><input type="checkbox" name="make_player_from_link" value="true" <?php if ($theOptions['make_player_from_link'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> />
302
  &nbsp; Turn mp3 links into players</p>
303
  <p style="margin-left:45px;"><span class="description">(Use the 'Add media' button on the edit screen to add links, or you can manually add/write links into the page. Links will be turned into players using the shortcode specified under 'Template Options' below.)</span></p>
304
 
305
 
306
  <br />
307
- <p class="jtick"><input type="checkbox" name="mp3foxOnBlog" value="true" <?php if ($theOptions['player_onblog'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Show players in posts on index, archive, and search pages &nbsp;<span class="description">(doesn't affect widgets)</span></p>
308
- <p class="jtick"><input type="checkbox" name="runShcodeInExcerpt" value="true" <?php if ($theOptions['run_shcode_in_excerpt'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Run shortcodes in post excerpts &nbsp;<span class="description">(this works for manually written post excerpts only)</span></p>
309
  <br />
310
 
311
  <?php
312
- $greyout_field = ( $theOptions['player_theme'] != "styleI" ) ? "background:#fcfcfc; color:#d6d6d6; border-color:#f0f0f0;" : "background:#fff; color:#000; border-color:#dfdfdf;";
313
- $greyout_text = ( $theOptions['player_theme'] != "styleI" ) ? "color:#d6d6d6;" : "color:#444;";
314
  ?>
315
  <!-- COLOUR / STYLE -->
316
  <div style="height:35px"><p style="width:55px; margin:0 0 0 20px; line-height:32px;">Players:</p></div>
317
  <p style="margin:-35px 0px 0px 75px; line-height:32px;"><select name="mp3foxTheme" id="player-select" style="width:94px; font-size:11px; line-height:19px;">
318
- <option value="styleF" <?php if ( 'styleF' == $theOptions['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Silver</option>
319
- <option value="styleG" <?php if ( 'styleG' == $theOptions['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Dark</option>
320
- <option value="styleH" <?php if ( 'styleH' == $theOptions['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Text</option>
321
- <option value="styleI" <?php if ( 'styleI' == $theOptions['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Custom</option>
322
  </select>&nbsp;
323
- <span id="player-csssheet" style=" <?php echo $greyout_text; ?>"> &nbsp;uri:</span><input type="text" id="mp3fcss" style="width:480px; <?php echo $greyout_field; ?>" name="mp3foxCustomStylesheet" value="<?php echo $theOptions['custom_stylesheet']; ?>" /></p>
324
 
325
  <?php
326
- //$showbox = ( $theOptions['admin_toggle_1'] == "true" ) ? "" : " display:none;";
327
- //$hide = ( $theOptions['admin_toggle_1'] == "true" ) ? "Hide " : "";
328
  ?>
329
 
330
  <p style="margin:4px 0px 15px 20px;"><a href="javascript:MP3J_ADMIN.toggleit('tog_1','Colour Settings');" id="tog_1-toggle" class="fox_buttonlink bl2">Colour Settings</a></p>
@@ -454,11 +487,11 @@
454
  <div style="float:left; width:65px; margin-left:9px; border:0px solid #aaa;"><p style="margin:0px;line-height:32px;">Colour:<br />Image:</p></div>
455
  <div style="float:left; width:460px; border:0px solid #aaa;">
456
  <p style="margin:0px;line-height:32px;">
457
- <input type="text" id="opK" onkeyup="udfcol('opK','blK');" size="10" name="mp3foxPopoutBackground" value="<?php echo $theOptions['popout_background']; ?>" />
458
  <span class="addcol" onclick="putfcolour('opK','blK');">&nbsp;+&nbsp;</span>
459
- <span class="bl" onclick="sendfcolour('opK');" id="blK" style="background:<?php echo $theOptions['popout_background']; ?>;">&nbsp;&nbsp;</span></p>
460
  <p style="margin:4px 0px 0px 0px;line-height:32px;">
461
- <input type="text" style="width:503px;" name="mp3foxPopoutBGimage" value="<?php echo $theOptions['popout_background_image']; ?>" /></p>
462
  </div>
463
  <br clear="all" />
464
  </div>
@@ -488,7 +521,7 @@
488
  $n = 1;
489
  foreach ( $library['filenames'] as $i => $file ) {
490
  //$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&amp;action=edit\" style=\"font-size:11px;\">[Edit]</a>&nbsp;&nbsp;<span style=\"color:#aaa;font-size:11px;\">" . $n++ . "&nbsp;</span> " . $file . "&nbsp;&nbsp;<span style=\"color:#aaa;font-size:11px;\">\"" . $library['titles'][$i] . "\"&nbsp;&nbsp;" . $library['excerpts'][$i] . "</span>" . $br;
491
- switch( $theOptions['library_sortcol'] ) {
492
  case "title":
493
  $liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&amp;action=edit\" style=\"font-size:11px;\">[Edit]</a>&nbsp;&nbsp;<span style=\"color:#aaa;font-size:11px;\">" . $n++ . "&nbsp;&nbsp;\"" . $library['titles'][$i] . "\"&nbsp;&nbsp;" . $library['excerpts'][$i] . "</span>&nbsp;&nbsp;" . $file . $br;
494
  break;
@@ -509,27 +542,27 @@
509
  <p class="description" style="margin:0 0 0 33px;">You just need to write filenames in playlists to play from the library.</p>
510
  <p style="margin:12px 0 12px 34px;">Order playlists by:&nbsp;
511
  <select name="librarySortcol" style="width:110px; font-size:11px;">
512
- <option value="file" <?php if ( 'file' == $theOptions['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Filename</option>
513
- <option value="date" <?php if ( 'date' == $theOptions['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Date Uploaded</option>
514
- <option value="caption" <?php if ( 'caption' == $theOptions['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Caption, Title</option>
515
- <option value="title" <?php if ( 'title' == $theOptions['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Title</option>
516
  </select>
517
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Direction:&nbsp;
518
  <select name="libraryDirection" style="width:60px; font-size:11px;">
519
- <option value="ASC" <?php if ( 'ASC' == $theOptions['library_direction'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>ASC</option>
520
- <option value="DESC" <?php if ( 'DESC' == $theOptions['library_direction'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>DESC</option>
521
  </select>
522
  </p><br />
523
 
524
  <!-- Folder -->
525
  <h3>Folder or URI</h3>
526
  <p class="description" style="margin:0 0 0 35px;">Set a default folder or uri for playing mp3's in the box below, eg. <code>/music</code> or <code>www.anothersite.com/music</code><br />You just need to write filenames in playlists to play from here.</p>
527
- <p style="margin:10px 0px 5px 35px;">Default path: &nbsp; <input type="text" style="width:385px;" name="mp3foxfolder" value="<?php echo $theOptions['mp3_dir']; ?>" /></p>
528
 
529
  <?php
530
  // create file-list if directory is local
531
  $n = 1;
532
- $folderuris = $mp3_fox->grab_local_folder_mp3s( $theOptions['mp3_dir'] );
533
  if ( is_array($folderuris) ){
534
  foreach ( $folderuris as $i => $uri ) {
535
  $files[$i] = strrchr( $uri, "/" );
@@ -555,7 +588,7 @@
555
  else { echo "</p>"; }
556
  }
557
  elseif ( $folderuris == true )
558
- echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">Unable to read or locate the folder <code>" . $theOptions['mp3_dir'] . "</code> check the path and folder permissions</p>";
559
  else
560
  echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">No info is available on remote folders but you can play from here if you know the filenames</p>";
561
  ?>
@@ -568,50 +601,50 @@
568
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>
569
  <div id="fox_op1-list" class="jopbox">
570
  <br />
571
- <p>Width: &nbsp; <input type="text" style="width:75px;" name="mp3foxPlayerWidth" value="<?php echo $theOptions['player_width']; ?>" /> &nbsp; <span class="description">pixels (px) or percent (%)</span></p>
572
  <p>Align: &nbsp;&nbsp;
573
  <select name="mp3foxFloat" style="width:94px; font-size:11px; line-height:16px;">
574
- <option value="none" <?php if ( 'none' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Left</option>
575
- <option value="rel-C" <?php if ( 'rel-C' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Centre</option>
576
- <option value="rel-R" <?php if ( 'rel-R' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Right</option>
577
- <option value="left" <?php if ( 'left' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float left</option>
578
- <option value="right" <?php if ( 'right' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float right</option>
579
  </select></p>
580
  <br /><br />
581
 
582
- <!-- <p><input type="checkbox" name="mp3foxDownloadMp3" value="true" <?php //if ($theOptions['show_downloadmp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Display a 'Download mp3' link</p> -->
583
  <h3 style="margin-left:0;"><strong>Downloads</strong></h3>
584
  <p style="margin-bottom:10px;">Show download link:
585
  <select name="mp3foxDownloadMp3" style="width:120px; font-size:11px; line-height:16px;">
586
- <option value="true" <?php if ( 'true' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Yes</option>
587
- <option value="false" <?php if ( 'false' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>No</option>
588
- <option value="loggedin" <?php if ( 'loggedin' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>To logged in users</option>
589
  </select>
590
  &nbsp;&nbsp;
591
  </p>
592
 
593
  <p class="description" style="margin:0 0 5px 30px;">When setting a player for logged in downloads, use the following options to add text/link for logged out visitors:</p>
594
- <p style="margin-left:30px;">Visitor text: &nbsp; <input type="text" style="width:145px;" name="loggedout_dload_text" value="<?php echo $theOptions['loggedout_dload_text']; ?>" /> &nbsp;<span class="description">(leave blank for no text/link)</span></p>
595
- <p style="margin-left:30px;">Visitor link: &nbsp; <input type="text" style="width:350px;" name="loggedout_dload_link" value="<?php echo $theOptions['loggedout_dload_link']; ?>" /> &nbsp;<span class="description">(optional url for visitor text)</span></p>
596
 
597
  <br />
598
  <!--<span class="description">(can be set per-player via shortcodes)</span>-->
599
 
600
- <p>Download link text: <input type="text" style="width:140px;" name="dload_text" value="<?php echo $theOptions['dload_text']; ?>" /></p>
601
 
602
- <p style="margin-top:15px;"><input type="checkbox" name="force_browser_dload" value="true" <?php if ($theOptions['force_browser_dload'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;
603
  Try to force browsers to save downloads <span class="description">(no mobile support yet)</span>
604
  <!--&nbsp; Local files
605
- <input type="radio" name="force_browser_dload_remote" value="false" <?php //if ($theOptions['force_browser_dload_remote'] == "false") { echo 'checked="checked"'; } ?> />
606
  &nbsp; | &nbsp;
607
- <input type="radio" name="force_browser_dload_remote" value="true" <?php //if ($theOptions['force_browser_dload_remote'] == "true") { echo 'checked="checked"'; } ?>/>
608
  All files -->
609
  </p>
610
 
611
  <p style="margin:10px 0 0 30px;"><span class="description">If you play from other domains and want to force the download, then use
612
  the field<br />below to specify a path to a downloader file. <a href="<?php echo $mp3_fox->PluginFolder; ?>/remote/help.txt">See help on setting this up</a>.</span></p>
613
 
614
- <p style="margin:5px 0 0 30px;">Path to remote downloader files: <input type="text" style="width:240px;" name="dloader_remote_path" value="<?php echo $theOptions['dloader_remote_path']; ?>" /></p>
615
 
616
  <!--<p style="margin:5px 0 0 25px;"><span class="description">(if you select 'All files' then you'll need to place a downloader file on any remote servers you want to force downloads from.
617
  There's a file included in the plugin for use on servers running php, see <a href="<?php //echo $mp3_fox->PluginFolder; ?>/remote/help.txt">remote setup help</a> for instructions)</span></p>-->
@@ -619,33 +652,33 @@
619
 
620
  <br /><br />
621
  <h3 style="margin-left:0;"><strong>Margins</strong></h3>
622
- <p>Above players: &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_top" value="<?php echo $theOptions['paddings_top']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span><br />
623
- Inner margin: (floated players) &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_inner" value="<?php echo $theOptions['paddings_inner']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span><br />
624
- Below players: &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_bottom" value="<?php echo $theOptions['paddings_bottom']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span></p>
625
 
626
 
627
  <br /><br />
628
  <h3 style="margin-left:0;"><strong>Playlists</strong></h3>
629
- <p>Max playlist height: &nbsp; <input type="text" size="6" style="text-align:center;" name="mp3foxMaxListHeight" value="<?php echo $theOptions['max_list_height']; ?>" /> px &nbsp; <span class="description">(a scroll bar will show for longer playlists, leave it blank for no limit)</span></p>
630
- <p><input type="checkbox" name="mp3foxShowPlaylist" value="true" <?php if ($theOptions['playlist_show'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Start with playlists showing</p>
631
 
632
  <div style="margin: 10px 0px 10px 0px; padding:6px; background:#f9f9f9; border:1px solid #eee;">
633
  <p>Playlist Separators <span class="description">- CAUTION: You'll need to manually update any existing playlists if you change the separators!</p>
634
  <p style="margin-left:20px;">Files: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
635
  <select name="file_separator" style="width:120px; font-size:11px; line-height:16px;">
636
- <option value="," <?php if ( ',' == $theOptions['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>, (comma)</option>
637
- <option value=";" <?php if ( ';' == $theOptions['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>; (semicolon)</option>
638
- <option value="###" <?php if ( '###' == $theOptions['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>### (3 hashes)</option>
639
  </select>
640
- &nbsp;&nbsp;<span class="description">eg.</span> <code>tracks="fileA.mp3 <?php echo $theOptions['f_separator']; ?> Title@fileB.mp3 <?php echo $theOptions['f_separator']; ?> fileC.mp3"</code></p>
641
 
642
  <p style="margin-left:20px;">Captions: &nbsp;&nbsp;
643
  <select name="caption_separator" style="width:120px; font-size:11px; line-height:16px;">
644
- <option value="," <?php if ( ',' == $theOptions['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>, (comma)</option>
645
- <option value=";" <?php if ( ';' == $theOptions['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>; (semicolon)</option>
646
- <option value="###" <?php if ( '###' == $theOptions['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>### (3 hashes)</option>
647
  </select>
648
- &nbsp;&nbsp;<span class="description">eg.</span> <code>captions="Caption A <?php echo $theOptions['c_separator']; ?> Caption B <?php echo $theOptions['c_separator']; ?> Caption C"</code></p>
649
  </div>
650
 
651
  </div>
@@ -653,25 +686,25 @@
653
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op5','Single Player Options');" id="fox_op5-toggle">Single Player Options</a>-->
654
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op5','Single Player Options');" id="fox_op5-toggle">Single Player Options</a>
655
  <div id="fox_op5-list" class="jopbox">
656
- <p><input type="checkbox" name="volslider_onsingles" value="true" <?php if ($theOptions['volslider_on_singles'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Volume sliders on [mp3<strong>t</strong>] players</p>
657
- <p><input type="checkbox" name="volslider_onmp3j" value="true" <?php if ($theOptions['volslider_on_mp3j'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Volume sliders on [mp3<strong>j</strong>] players</p>
658
  </div>
659
 
660
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op2','Pop-Out Options');" id="fox_op2-toggle">Pop-Out Options</a>-->
661
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op2','Pop-Out Options');" id="fox_op2-toggle">Pop-Out Options</a>
662
  <div id="fox_op2-list" class="jopbox">
663
- <p><input type="checkbox" name="mp3foxEnablePopout" value="true" <?php if ($theOptions['enable_popout'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Enable the pop-out player</p>
664
- <p>Window width: &nbsp; <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutWidth" value="<?php echo $theOptions['popout_width']; ?>" /> px <span class="description">&nbsp; (250 - 1600)</span></p>
665
- <p>Window max height: &nbsp; <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutMaxHeight" value="<?php echo $theOptions['popout_max_height']; ?>" /> px <span class="description">&nbsp; (200 - 1200) &nbsp; a scroll bar will show for longer playlists</span></p>
666
- <p>Launch button text: &nbsp; <input type="text" style="width:200px;" name="mp3foxPopoutButtonText" value="<?php echo $theOptions['popout_button_title']; ?>" /></p>
667
  </div>
668
 
669
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op3','File Options');" id="fox_op3-toggle">File Options</a>-->
670
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op3','File Options');" id="fox_op3-toggle">File Options</a>
671
  <div id="fox_op3-list" class="jopbox">
672
- <p><input type="checkbox" name="mp3foxHideExtension" value="true" <?php if ($theOptions['hide_mp3extension'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Hide '.mp3' extension if a filename is displayed<br /><span class="description" style="margin-left:28px;">(filenames are displayed when there's no available titles)</span></p>
673
- <p><input type="checkbox" name="mp3foxEncodeFiles" value="true" <?php if ($theOptions['encode_files'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Encode URI's and filenames<br /><span class="description" style="margin-left:28px;">(provides some obfuscation of your urls in the page source)</span></p>
674
- <p><input type="checkbox" name="mp3foxAllowRemote" value="true" <?php if ($theOptions['allow_remoteMp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Allow playing of off-site mp3's<br /><span class="description" style="margin-left:28px;">(unchecking this option doesn't affect mp3's playing from a remote default folder if one is set above)</span></p>
675
  </div>
676
 
677
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>-->
@@ -682,21 +715,21 @@
682
  <p style="margin:10px 0 10px 0px;">Shortcode for 'Turn mp3 links into players' option:</p>
683
 
684
  <p style="margin:0px 0 20px 25px;"><textarea class="widefat" style="width:580px; height:100px;" name="make_player_from_link_shcode"><?php
685
- $deslashed = str_replace('\"', '"', $theOptions['make_player_from_link_shcode'] );
686
  echo $deslashed;
687
  ?></textarea><br /><span class="description">Can also include text/html. Placeholders:</span> <code>{TEXT}</code> <span class="description">- Link text,</span> <code>{URL}</code> <span class="description">- Link url.</span></p>
688
 
689
 
690
 
691
- <p><input type="checkbox" name="mp3foxUseFixedCSS" value="true" <?php if ($theOptions['use_fixed_css'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Bypass colour settings<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(colours can still be set in css)</span></p>
692
- <p><input type="checkbox" name="disableTemplateTag" value="true" <?php if ($theOptions['disable_template_tag'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Bypass player template-tags in theme files<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(ignores mp3j_addscripts() and mp3j_put() template functions)</span></p>
693
 
694
- <?php $greyout_text = ( $theOptions['disable_jquery_libs'] == "yes" ) ? ' style="color:#d6d6d6;"' : ''; ?>
695
- <p<?php echo $greyout_text; ?>><input type="checkbox" name="touch_punch_js" value="true" <?php if ($theOptions['touch_punch_js'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Include additional js for touch screen support<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description"<?php echo $greyout_text; ?>>(adds jquery.ui.touch-punch.js script)</span></p>
696
- <p><input type="checkbox" name="mp3foxEchoDebug" value="true" <?php if ($theOptions['echo_debug'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Turn on debug<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(info appears in the source view near the bottom)</span></p>
697
- <?php $bgc = ( $theOptions['disable_jquery_libs'] == "yes" ) ? "#fdd" : "#f9f9f9"; ?>
698
  <div style="margin: 20px 0px 10px 0px; padding:6px; background:<?php echo $bgc; ?>; border:1px solid #eee;">
699
- <p style="margin:0 0 5px 18px;">Disable jQuery and jQuery-UI javascript libraries? &nbsp; <input type="text" style="width:60px;" name="disableJSlibs" value="<?php echo $theOptions['disable_jquery_libs']; ?>" /></p>
700
  <p style="margin: 0 0 8px 18px;"><span class="description"><strong>CAUTION!!</strong> This option will bypass the request <strong>from this plugin only</strong> for both jQuery <strong>and</strong> jQuery-UI scripts,
701
  you <strong>MUST</strong> be providing these scripts from an alternative source.
702
  <br />Type <code>yes</code> in the box and save settings to bypass jQuery and jQuery-UI.</span></p>
@@ -704,8 +737,8 @@
704
  </div>
705
  </div><!-- close .joptionswrap -->
706
 
707
- <p style="margin-top: 4px;"><input type="submit" name="update_mp3foxSettings" class="button-primary" value="<?php _e('Update Settings', $mp3_fox->textdomain ) ?>" /> &nbsp; Remember settings if plugin is deactivated &nbsp;<input type="checkbox" name="mp3foxRemember" value="true" <?php if ($theOptions['remember_settings'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /></p>
708
- <input id="fox_styling" type="hidden" name="MtogBox1" value="<?php echo $theOptions['admin_toggle_1']; // Colour settings toggle state ?>" />
709
  <input type="hidden" name="mp3foxPluginVersion" value="<?php echo $mp3_fox->version_of_plugin; ?>" />
710
  </form><br />
711
  <div style="margin: 15px 120px 25px 0px; border-top: 1px solid #999; height: 30px;"><p class="description" style="margin: 0px 120px px 0px;"><a href="http://sjward.org/jplayer-for-wordpress">Plugin home page</a></p></div>
2
  function mp3j_print_admin_page() {
3
 
4
  global $mp3_fox;
5
+ $O = $mp3_fox->getAdminOptions();
6
  $colours_array = array();
7
 
8
+ if ( isset( $_POST['update_mp3foxSettings'] ) )
9
  {
10
+
11
+ //prep/sanitize number values
12
  if (isset($_POST['mp3foxVol'])) {
13
+ $O['initial_vol'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxVol']);
14
+ if ($O['initial_vol'] < 0 || $O['initial_vol']=="") { $O['initial_vol'] = "0"; }
15
+ if ($O['initial_vol'] > 100) { $O['initial_vol'] = "100"; }
16
  }
17
  if (isset($_POST['mp3foxPopoutMaxHeight'])) {
18
+ $O['popout_max_height'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxPopoutMaxHeight']);
19
+ if ( $O['popout_max_height'] == "" ) { $O['popout_max_height'] = "750"; }
20
+ if ( $O['popout_max_height'] < 200 ) { $O['popout_max_height'] = "200"; }
21
+ if ( $O['popout_max_height'] > 1200 ) { $O['popout_max_height'] = "1200"; }
22
  }
23
  if (isset($_POST['mp3foxPopoutWidth'])) {
24
+ $O['popout_width'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxPopoutWidth']);
25
+ if ( $O['popout_width'] == "" ) { $O['popout_width'] = "400"; }
26
+ if ( $O['popout_width'] < 250 ) { $O['popout_width'] = "250"; }
27
+ if ( $O['popout_width'] > 1600 ) { $O['popout_width'] = "1600"; }
28
  }
29
  if (isset($_POST['mp3foxMaxListHeight'])) {
30
+ $O['max_list_height'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxMaxListHeight']);
31
+ if ( $O['max_list_height'] < 0 ) { $O['max_list_height'] = ""; }
32
+ }
33
+
34
+ //prep/sanitize paths
35
+ if (isset($_POST['mp3foxfolder'])) {
36
+ $O['mp3_dir'] = $mp3_fox->prep_path( $_POST['mp3foxfolder'] );
37
+ }
38
+ if (isset($_POST['mp3foxCustomStylesheet'])) {
39
+ $O['custom_stylesheet'] = $mp3_fox->prep_path( $_POST['mp3foxCustomStylesheet'] );
40
+ }
41
+ if (isset($_POST['mp3foxPopoutBGimage'])) {
42
+ $O['popout_background_image'] = $mp3_fox->prep_path( $_POST['mp3foxPopoutBGimage'] );
43
  }
44
 
45
+ $O['dloader_remote_path'] = ( isset($_POST['dloader_remote_path']) ) ? $mp3_fox->prep_value( $_POST['dloader_remote_path'] ) : "";
46
+ $O['loggedout_dload_link'] = ( $_POST['loggedout_dload_link'] == "" ) ? "" : $mp3_fox->prep_value( $_POST['loggedout_dload_link'] ); //allow it to be empty
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
+ //prep/sanitize options and checkboxes
49
+ if (isset($_POST['mp3foxTheme'])) {
50
+ $O['player_theme'] = $mp3_fox->prep_value( $_POST['mp3foxTheme'] );
51
+ }
52
+ if (isset($_POST['mp3foxFloat'])) {
53
+ $O['player_float'] = $mp3_fox->prep_value( $_POST['mp3foxFloat'] );
54
+ }
55
+ if (isset($_POST['librarySortcol'])) {
56
+ $O['library_sortcol'] = $mp3_fox->prep_value( $_POST['librarySortcol'] );
57
+ }
58
+ if (isset($_POST['libraryDirection'])) {
59
+ $O['library_direction'] = $mp3_fox->prep_value( $_POST['libraryDirection'] );
60
+ }
61
+ if (isset($_POST['file_separator'])) {
62
+ $O['f_separator'] = $mp3_fox->prep_value( $_POST['file_separator'] );
63
+ }
64
+ if (isset($_POST['caption_separator'])) {
65
+ $O['c_separator'] = $mp3_fox->prep_value( $_POST['caption_separator'] );
66
+ }
67
+ if (isset($_POST['mp3foxDownloadMp3'])) {
68
+ $O['show_downloadmp3'] = $mp3_fox->prep_value( $_POST['mp3foxDownloadMp3'] );
69
+ }
70
 
71
+ $O['disable_template_tag'] = ( isset($_POST['disableTemplateTag']) ) ? "true" : "false";
72
+ $O['echo_debug'] = ( isset($_POST['mp3foxEchoDebug']) ) ? "true" : "false";
73
+ $O['add_track_numbering'] = ( isset($_POST['mp3foxAddTrackNumbers']) ) ? "true" : "false";
74
+ $O['enable_popout'] = ( isset($_POST['mp3foxEnablePopout']) ) ? "true" : "false";
75
+ $O['playlist_repeat'] = ( isset($_POST['mp3foxPlaylistRepeat']) ) ? "true" : "false";
76
+ $O['use_fixed_css'] = ( isset($_POST['mp3foxUseFixedCSS']) ) ? "true" : "false";
77
+ $O['encode_files'] = ( isset($_POST['mp3foxEncodeFiles']) ) ? "true" : "false";
78
+ $O['run_shcode_in_excerpt'] = ( isset($_POST['runShcodeInExcerpt']) ) ? "true" : "false";
79
+ $O['volslider_on_singles'] = ( isset($_POST['volslider_onsingles']) ) ? "true" : "false";
80
+ $O['volslider_on_mp3j'] = ( isset($_POST['volslider_onmp3j']) ) ? "true" : "false";
81
+ $O['touch_punch_js'] = ( isset($_POST['touch_punch_js']) ) ? "true" : "false";
82
+ $O['force_browser_dload'] = ( isset($_POST['force_browser_dload']) ) ? "true" : "false";
83
+ $O['make_player_from_link'] = ( isset($_POST['make_player_from_link']) ) ? "true" : "false";
84
+ $O['auto_play'] = ( isset($_POST['mp3foxAutoplay']) ) ? "true" : "false";
85
+ $O['allow_remoteMp3'] = ( isset($_POST['mp3foxAllowRemote']) ) ? "true" : "false";
86
+ $O['player_onblog'] = ( isset($_POST['mp3foxOnBlog']) ) ? "true" : "false";
87
+ $O['playlist_show'] = ( isset($_POST['mp3foxShowPlaylist']) ) ? "true" : "false";
88
+ $O['remember_settings'] = ( isset($_POST['mp3foxRemember']) ) ? "true" : "false";
89
+ $O['hide_mp3extension'] = ( isset($_POST['mp3foxHideExtension']) ) ? "true" : "false";
90
 
91
+ //prep/sanitize other values
92
+ if (isset($_POST['mp3foxPlayerWidth'])) {
93
+ $O['player_width'] = $mp3_fox->prep_value( $_POST['mp3foxPlayerWidth'] );
94
+ }
95
+ if (isset($_POST['disableJSlibs'])) {
96
+ $O['disable_jquery_libs'] = ( preg_match("/^yes$/i", $_POST['disableJSlibs']) ) ? "yes" : "";
97
+ }
98
 
99
+ $O['paddings_top'] = ( $_POST['mp3foxPaddings_top'] == "" ) ? "0px" : $mp3_fox->prep_value( $_POST['mp3foxPaddings_top'] );
100
+ $O['paddings_bottom'] = ( $_POST['mp3foxPaddings_bottom'] == "" ) ? "0px" : $mp3_fox->prep_value( $_POST['mp3foxPaddings_bottom'] );
101
+ $O['paddings_inner'] = ( $_POST['mp3foxPaddings_inner'] == "" ) ? "0px" : $mp3_fox->prep_value( $_POST['mp3foxPaddings_inner'] );
102
 
103
+ if ( isset($_POST['mp3foxPopoutBackground']) ) {
104
+ $O['popout_background'] = $mp3_fox->prep_value( $_POST['mp3foxPopoutBackground'] );
105
+ }
106
+ if ( isset($_POST['mp3foxPluginVersion']) ) {
107
+ $O['db_plugin_version'] = $mp3_fox->prep_value( $_POST['mp3foxPluginVersion'] );
108
+ }
109
+ if ( isset($_POST['MtogBox1']) ) {
110
+ $O['admin_toggle_1'] = $mp3_fox->prep_value( $_POST['MtogBox1'] );
111
+ }
 
 
 
112
 
113
+ //prep/sanitize text
114
+ $O['dload_text'] = ( $_POST['dload_text'] == "" ) ? "DOWNLOAD MP3" : $mp3_fox->prep_text( $_POST['dload_text'] );
115
+ $O['loggedout_dload_text'] = ( $_POST['loggedout_dload_text'] == "" ) ? "" : $mp3_fox->prep_text( $_POST['loggedout_dload_text'] );
116
 
117
+ if ( isset($_POST['mp3foxPopoutButtonText']) ) {
118
+ $O['popout_button_title'] = $mp3_fox->prep_text( $_POST['mp3foxPopoutButtonText'] );
119
+ }
120
+ if ( isset($_POST['make_player_from_link_shcode']) ) {
121
+ $O['make_player_from_link_shcode'] = $mp3_fox->prep_text( $_POST['make_player_from_link_shcode'] );
122
+ }
123
 
124
+ // Colours array//
125
+ if (isset($_POST['mp3foxScreenColour'])) { $colours_array['screen_colour'] = $mp3_fox->prep_value( $_POST['mp3foxScreenColour'] ); }
126
+ if (isset($_POST['mp3foxScreenOpac'])) { $colours_array['screen_opacity'] = $mp3_fox->prep_value( $_POST['mp3foxScreenOpac'] ); }
127
+ if (isset($_POST['mp3foxLoadbarColour'])) { $colours_array['loadbar_colour'] = $mp3_fox->prep_value( $_POST['mp3foxLoadbarColour'] ); }
128
+ if (isset($_POST['mp3foxLoadbarOpac'])) { $colours_array['loadbar_opacity'] = $mp3_fox->prep_value( $_POST['mp3foxLoadbarOpac'] ); }
129
+ if (isset($_POST['mp3foxPosbarColour'])) { $colours_array['posbar_colour'] = $mp3_fox->prep_value( $_POST['mp3foxPosbarColour'] ); }
130
+ if (isset($_POST['mp3foxPosbarTint'])) { $colours_array['posbar_tint'] = $mp3_fox->prep_value( $_POST['mp3foxPosbarTint'] ); }
131
+ if (isset($_POST['mp3foxPosbarOpac'])) { $colours_array['posbar_opacity'] = $mp3_fox->prep_value( $_POST['mp3foxPosbarOpac'] ); }
132
+ if (isset($_POST['mp3foxScreenTextColour'])) { $colours_array['screen_text_colour'] = $mp3_fox->prep_value( $_POST['mp3foxScreenTextColour'] ); }
133
+ if (isset($_POST['mp3foxPlaylistColour'])) { $colours_array['playlist_colour'] = $mp3_fox->prep_value( $_POST['mp3foxPlaylistColour'] ); }
134
+ if (isset($_POST['mp3foxPlaylistTint'])) { $colours_array['playlist_tint'] = $mp3_fox->prep_value( $_POST['mp3foxPlaylistTint'] ); }
135
+ if (isset($_POST['mp3foxPlaylistOpac'])) { $colours_array['playlist_opacity'] = $mp3_fox->prep_value( $_POST['mp3foxPlaylistOpac'] ); }
136
+ if (isset($_POST['mp3foxListTextColour'])) { $colours_array['list_text_colour'] = $mp3_fox->prep_value( $_POST['mp3foxListTextColour'] ); }
137
+ if (isset($_POST['mp3foxListCurrentColour'])) { $colours_array['list_current_colour'] = $mp3_fox->prep_value( $_POST['mp3foxListCurrentColour'] ); }
138
+ if (isset($_POST['mp3foxListHoverColour'])) { $colours_array['list_hover_colour'] = $mp3_fox->prep_value( $_POST['mp3foxListHoverColour'] ); }
139
+ if (isset($_POST['mp3foxListBGaHover'])) { $colours_array['listBGa_hover'] = $mp3_fox->prep_value( $_POST['mp3foxListBGaHover'] ); }
140
+ if (isset($_POST['mp3foxListBGaCurrent'])) { $colours_array['listBGa_current'] = $mp3_fox->prep_value( $_POST['mp3foxListBGaCurrent'] ); }
141
+ if (isset($_POST['mp3foxVolGrad'])) { $colours_array['volume_grad'] = $mp3_fox->prep_value( $_POST['mp3foxVolGrad'] ); }
142
+ if (isset($_POST['mp3foxListDivider'])) { $colours_array['list_divider'] = $mp3_fox->prep_value( $_POST['mp3foxListDivider'] ); }
143
+ if (isset($_POST['mp3foxIndicator'])) { $colours_array['indicator'] = $mp3_fox->prep_value( $_POST['mp3foxIndicator'] ); }
144
+ $O['colour_settings'] = $colours_array;
145
 
146
+ update_option($mp3_fox->adminOptionsName, $O);
147
+ $mp3_fox->theSettings = $O;
148
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
 
 
 
150
  <!-- Settings saved message -->
151
  <div class="updated"><p><strong><?php _e("Settings Updated.", $mp3_fox->textdomain );?></strong></p></div>
152
 
153
  <?php
154
  }
155
  // Pick up current colours
156
+ $current_colours = $O['colour_settings'];
157
  ?>
158
 
159
  <div class="wrap">
160
  <h2>&nbsp;</h2>
161
  <h1>MP3<span style="font-size:16px;"> - </span>jPlayer<span class="description" style="font-size:10px;">&nbsp; <?php echo $mp3_fox->version_of_plugin; ?></span> &nbsp;&nbsp;
162
+ <?php if ( $O['disable_jquery_libs'] == "yes" ) { ?><span style="font-size: 11px; font-weight:700; color:#f66;">(jQuery and UI scripts are turned off)</span><?php } ?></h1>
163
 
164
  <h5 style="margin: 0 0 30px 0; padding:0; font-size:10px;">
165
  <a href="javascript:MP3J_ADMIN.toggleit('tog_0','HELP');" id="tog_0-toggle" class="fox_buttonlink">HELP</a>&nbsp;<a href="widgets.php" class="fox_buttonlink">WIDGETS</a>
325
  </div>
326
 
327
  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
328
+ <p class="jtext">Initial volume &nbsp; <input type="text" style="text-align:center;" size="2" name="mp3foxVol" value="<?php echo $O['initial_vol']; ?>" /> &nbsp; <span class="description">(0 - 100)</span></p>
329
+ <p class="jtick"><input type="checkbox" name="mp3foxAutoplay" value="true" <?php if ($O['auto_play'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Autoplay</p>
330
+ <p class="jtick"><input type="checkbox" name="mp3foxPlaylistRepeat" value="true" <?php if ($O['playlist_repeat'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Loop</p>
331
+ <p class="jtick"><input type="checkbox" name="mp3foxAddTrackNumbers" value="true" <?php if ($O['add_track_numbering'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Number the tracks</p>
 
332
 
333
  <br />
334
+ <p class="jtick"><input type="checkbox" name="make_player_from_link" value="true" <?php if ($O['make_player_from_link'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> />
335
  &nbsp; Turn mp3 links into players</p>
336
  <p style="margin-left:45px;"><span class="description">(Use the 'Add media' button on the edit screen to add links, or you can manually add/write links into the page. Links will be turned into players using the shortcode specified under 'Template Options' below.)</span></p>
337
 
338
 
339
  <br />
340
+ <p class="jtick"><input type="checkbox" name="mp3foxOnBlog" value="true" <?php if ($O['player_onblog'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Show players in posts on index, archive, and search pages &nbsp;<span class="description">(doesn't affect widgets)</span></p>
341
+ <p class="jtick"><input type="checkbox" name="runShcodeInExcerpt" value="true" <?php if ($O['run_shcode_in_excerpt'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Run shortcodes in post excerpts &nbsp;<span class="description">(this works for manually written post excerpts only)</span></p>
342
  <br />
343
 
344
  <?php
345
+ $greyout_field = ( $O['player_theme'] != "styleI" ) ? "background:#fcfcfc; color:#d6d6d6; border-color:#f0f0f0;" : "background:#fff; color:#000; border-color:#dfdfdf;";
346
+ $greyout_text = ( $O['player_theme'] != "styleI" ) ? "color:#d6d6d6;" : "color:#444;";
347
  ?>
348
  <!-- COLOUR / STYLE -->
349
  <div style="height:35px"><p style="width:55px; margin:0 0 0 20px; line-height:32px;">Players:</p></div>
350
  <p style="margin:-35px 0px 0px 75px; line-height:32px;"><select name="mp3foxTheme" id="player-select" style="width:94px; font-size:11px; line-height:19px;">
351
+ <option value="styleF" <?php if ( 'styleF' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Silver</option>
352
+ <option value="styleG" <?php if ( 'styleG' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Dark</option>
353
+ <option value="styleH" <?php if ( 'styleH' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Text</option>
354
+ <option value="styleI" <?php if ( 'styleI' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Custom</option>
355
  </select>&nbsp;
356
+ <span id="player-csssheet" style=" <?php echo $greyout_text; ?>"> &nbsp;uri:</span><input type="text" id="mp3fcss" style="width:480px; <?php echo $greyout_field; ?>" name="mp3foxCustomStylesheet" value="<?php echo $O['custom_stylesheet']; ?>" /></p>
357
 
358
  <?php
359
+ //$showbox = ( $O['admin_toggle_1'] == "true" ) ? "" : " display:none;";
360
+ //$hide = ( $O['admin_toggle_1'] == "true" ) ? "Hide " : "";
361
  ?>
362
 
363
  <p style="margin:4px 0px 15px 20px;"><a href="javascript:MP3J_ADMIN.toggleit('tog_1','Colour Settings');" id="tog_1-toggle" class="fox_buttonlink bl2">Colour Settings</a></p>
487
  <div style="float:left; width:65px; margin-left:9px; border:0px solid #aaa;"><p style="margin:0px;line-height:32px;">Colour:<br />Image:</p></div>
488
  <div style="float:left; width:460px; border:0px solid #aaa;">
489
  <p style="margin:0px;line-height:32px;">
490
+ <input type="text" id="opK" onkeyup="udfcol('opK','blK');" size="10" name="mp3foxPopoutBackground" value="<?php echo $O['popout_background']; ?>" />
491
  <span class="addcol" onclick="putfcolour('opK','blK');">&nbsp;+&nbsp;</span>
492
+ <span class="bl" onclick="sendfcolour('opK');" id="blK" style="background:<?php echo $O['popout_background']; ?>;">&nbsp;&nbsp;</span></p>
493
  <p style="margin:4px 0px 0px 0px;line-height:32px;">
494
+ <input type="text" style="width:503px;" name="mp3foxPopoutBGimage" value="<?php echo $O['popout_background_image']; ?>" /></p>
495
  </div>
496
  <br clear="all" />
497
  </div>
521
  $n = 1;
522
  foreach ( $library['filenames'] as $i => $file ) {
523
  //$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&amp;action=edit\" style=\"font-size:11px;\">[Edit]</a>&nbsp;&nbsp;<span style=\"color:#aaa;font-size:11px;\">" . $n++ . "&nbsp;</span> " . $file . "&nbsp;&nbsp;<span style=\"color:#aaa;font-size:11px;\">\"" . $library['titles'][$i] . "\"&nbsp;&nbsp;" . $library['excerpts'][$i] . "</span>" . $br;
524
+ switch( $O['library_sortcol'] ) {
525
  case "title":
526
  $liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&amp;action=edit\" style=\"font-size:11px;\">[Edit]</a>&nbsp;&nbsp;<span style=\"color:#aaa;font-size:11px;\">" . $n++ . "&nbsp;&nbsp;\"" . $library['titles'][$i] . "\"&nbsp;&nbsp;" . $library['excerpts'][$i] . "</span>&nbsp;&nbsp;" . $file . $br;
527
  break;
542
  <p class="description" style="margin:0 0 0 33px;">You just need to write filenames in playlists to play from the library.</p>
543
  <p style="margin:12px 0 12px 34px;">Order playlists by:&nbsp;
544
  <select name="librarySortcol" style="width:110px; font-size:11px;">
545
+ <option value="file" <?php if ( 'file' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Filename</option>
546
+ <option value="date" <?php if ( 'date' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Date Uploaded</option>
547
+ <option value="caption" <?php if ( 'caption' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Caption, Title</option>
548
+ <option value="title" <?php if ( 'title' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Title</option>
549
  </select>
550
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Direction:&nbsp;
551
  <select name="libraryDirection" style="width:60px; font-size:11px;">
552
+ <option value="ASC" <?php if ( 'ASC' == $O['library_direction'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>ASC</option>
553
+ <option value="DESC" <?php if ( 'DESC' == $O['library_direction'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>DESC</option>
554
  </select>
555
  </p><br />
556
 
557
  <!-- Folder -->
558
  <h3>Folder or URI</h3>
559
  <p class="description" style="margin:0 0 0 35px;">Set a default folder or uri for playing mp3's in the box below, eg. <code>/music</code> or <code>www.anothersite.com/music</code><br />You just need to write filenames in playlists to play from here.</p>
560
+ <p style="margin:10px 0px 5px 35px;">Default path: &nbsp; <input type="text" style="width:385px;" name="mp3foxfolder" value="<?php echo $O['mp3_dir']; ?>" /></p>
561
 
562
  <?php
563
  // create file-list if directory is local
564
  $n = 1;
565
+ $folderuris = $mp3_fox->grab_local_folder_mp3s( $O['mp3_dir'] );
566
  if ( is_array($folderuris) ){
567
  foreach ( $folderuris as $i => $uri ) {
568
  $files[$i] = strrchr( $uri, "/" );
588
  else { echo "</p>"; }
589
  }
590
  elseif ( $folderuris == true )
591
+ echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">Unable to read or locate the folder <code>" . $O['mp3_dir'] . "</code> check the path and folder permissions</p>";
592
  else
593
  echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">No info is available on remote folders but you can play from here if you know the filenames</p>";
594
  ?>
601
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>
602
  <div id="fox_op1-list" class="jopbox">
603
  <br />
604
+ <p>Width: &nbsp; <input type="text" style="width:75px;" name="mp3foxPlayerWidth" value="<?php echo $O['player_width']; ?>" /> &nbsp; <span class="description">pixels (px) or percent (%)</span></p>
605
  <p>Align: &nbsp;&nbsp;
606
  <select name="mp3foxFloat" style="width:94px; font-size:11px; line-height:16px;">
607
+ <option value="none" <?php if ( 'none' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Left</option>
608
+ <option value="rel-C" <?php if ( 'rel-C' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Centre</option>
609
+ <option value="rel-R" <?php if ( 'rel-R' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Right</option>
610
+ <option value="left" <?php if ( 'left' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float left</option>
611
+ <option value="right" <?php if ( 'right' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float right</option>
612
  </select></p>
613
  <br /><br />
614
 
615
+ <!-- <p><input type="checkbox" name="mp3foxDownloadMp3" value="true" <?php //if ($O['show_downloadmp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Display a 'Download mp3' link</p> -->
616
  <h3 style="margin-left:0;"><strong>Downloads</strong></h3>
617
  <p style="margin-bottom:10px;">Show download link:
618
  <select name="mp3foxDownloadMp3" style="width:120px; font-size:11px; line-height:16px;">
619
+ <option value="true" <?php if ( 'true' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Yes</option>
620
+ <option value="false" <?php if ( 'false' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>No</option>
621
+ <option value="loggedin" <?php if ( 'loggedin' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>To logged in users</option>
622
  </select>
623
  &nbsp;&nbsp;
624
  </p>
625
 
626
  <p class="description" style="margin:0 0 5px 30px;">When setting a player for logged in downloads, use the following options to add text/link for logged out visitors:</p>
627
+ <p style="margin-left:30px;">Visitor text: &nbsp; <input type="text" style="width:145px;" name="loggedout_dload_text" value="<?php echo $O['loggedout_dload_text']; ?>" /> &nbsp;<span class="description">(leave blank for no text/link)</span></p>
628
+ <p style="margin-left:30px;">Visitor link: &nbsp; <input type="text" style="width:350px;" name="loggedout_dload_link" value="<?php echo $O['loggedout_dload_link']; ?>" /> &nbsp;<span class="description">(optional url for visitor text)</span></p>
629
 
630
  <br />
631
  <!--<span class="description">(can be set per-player via shortcodes)</span>-->
632
 
633
+ <p>Download link text: <input type="text" style="width:140px;" name="dload_text" value="<?php echo $O['dload_text']; ?>" /></p>
634
 
635
+ <p style="margin-top:15px;"><input type="checkbox" name="force_browser_dload" value="true" <?php if ($O['force_browser_dload'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;
636
  Try to force browsers to save downloads <span class="description">(no mobile support yet)</span>
637
  <!--&nbsp; Local files
638
+ <input type="radio" name="force_browser_dload_remote" value="false" <?php //if ($O['force_browser_dload_remote'] == "false") { echo 'checked="checked"'; } ?> />
639
  &nbsp; | &nbsp;
640
+ <input type="radio" name="force_browser_dload_remote" value="true" <?php //if ($O['force_browser_dload_remote'] == "true") { echo 'checked="checked"'; } ?>/>
641
  All files -->
642
  </p>
643
 
644
  <p style="margin:10px 0 0 30px;"><span class="description">If you play from other domains and want to force the download, then use
645
  the field<br />below to specify a path to a downloader file. <a href="<?php echo $mp3_fox->PluginFolder; ?>/remote/help.txt">See help on setting this up</a>.</span></p>
646
 
647
+ <p style="margin:5px 0 0 30px;">Path to remote downloader files: <input type="text" style="width:240px;" name="dloader_remote_path" value="<?php echo $O['dloader_remote_path']; ?>" /></p>
648
 
649
  <!--<p style="margin:5px 0 0 25px;"><span class="description">(if you select 'All files' then you'll need to place a downloader file on any remote servers you want to force downloads from.
650
  There's a file included in the plugin for use on servers running php, see <a href="<?php //echo $mp3_fox->PluginFolder; ?>/remote/help.txt">remote setup help</a> for instructions)</span></p>-->
652
 
653
  <br /><br />
654
  <h3 style="margin-left:0;"><strong>Margins</strong></h3>
655
+ <p>Above players: &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_top" value="<?php echo $O['paddings_top']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span><br />
656
+ Inner margin: (floated players) &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_inner" value="<?php echo $O['paddings_inner']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span><br />
657
+ Below players: &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_bottom" value="<?php echo $O['paddings_bottom']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span></p>
658
 
659
 
660
  <br /><br />
661
  <h3 style="margin-left:0;"><strong>Playlists</strong></h3>
662
+ <p>Max playlist height: &nbsp; <input type="text" size="6" style="text-align:center;" name="mp3foxMaxListHeight" value="<?php echo $O['max_list_height']; ?>" /> px &nbsp; <span class="description">(a scroll bar will show for longer playlists, leave it blank for no limit)</span></p>
663
+ <p><input type="checkbox" name="mp3foxShowPlaylist" value="true" <?php if ($O['playlist_show'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Start with playlists showing</p>
664
 
665
  <div style="margin: 10px 0px 10px 0px; padding:6px; background:#f9f9f9; border:1px solid #eee;">
666
  <p>Playlist Separators <span class="description">- CAUTION: You'll need to manually update any existing playlists if you change the separators!</p>
667
  <p style="margin-left:20px;">Files: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
668
  <select name="file_separator" style="width:120px; font-size:11px; line-height:16px;">
669
+ <option value="," <?php if ( ',' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>, (comma)</option>
670
+ <option value=";" <?php if ( ';' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>; (semicolon)</option>
671
+ <option value="###" <?php if ( '###' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>### (3 hashes)</option>
672
  </select>
673
+ &nbsp;&nbsp;<span class="description">eg.</span> <code>tracks="fileA.mp3 <?php echo $O['f_separator']; ?> Title@fileB.mp3 <?php echo $O['f_separator']; ?> fileC.mp3"</code></p>
674
 
675
  <p style="margin-left:20px;">Captions: &nbsp;&nbsp;
676
  <select name="caption_separator" style="width:120px; font-size:11px; line-height:16px;">
677
+ <option value="," <?php if ( ',' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>, (comma)</option>
678
+ <option value=";" <?php if ( ';' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>; (semicolon)</option>
679
+ <option value="###" <?php if ( '###' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>### (3 hashes)</option>
680
  </select>
681
+ &nbsp;&nbsp;<span class="description">eg.</span> <code>captions="Caption A <?php echo $O['c_separator']; ?> Caption B <?php echo $O['c_separator']; ?> Caption C"</code></p>
682
  </div>
683
 
684
  </div>
686
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op5','Single Player Options');" id="fox_op5-toggle">Single Player Options</a>-->
687
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op5','Single Player Options');" id="fox_op5-toggle">Single Player Options</a>
688
  <div id="fox_op5-list" class="jopbox">
689
+ <p><input type="checkbox" name="volslider_onsingles" value="true" <?php if ($O['volslider_on_singles'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Volume sliders on [mp3<strong>t</strong>] players</p>
690
+ <p><input type="checkbox" name="volslider_onmp3j" value="true" <?php if ($O['volslider_on_mp3j'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Volume sliders on [mp3<strong>j</strong>] players</p>
691
  </div>
692
 
693
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op2','Pop-Out Options');" id="fox_op2-toggle">Pop-Out Options</a>-->
694
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op2','Pop-Out Options');" id="fox_op2-toggle">Pop-Out Options</a>
695
  <div id="fox_op2-list" class="jopbox">
696
+ <p><input type="checkbox" name="mp3foxEnablePopout" value="true" <?php if ($O['enable_popout'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Enable the pop-out player</p>
697
+ <p>Window width: &nbsp; <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutWidth" value="<?php echo $O['popout_width']; ?>" /> px <span class="description">&nbsp; (250 - 1600)</span></p>
698
+ <p>Window max height: &nbsp; <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutMaxHeight" value="<?php echo $O['popout_max_height']; ?>" /> px <span class="description">&nbsp; (200 - 1200) &nbsp; a scroll bar will show for longer playlists</span></p>
699
+ <p>Launch button text: &nbsp; <input type="text" style="width:200px;" name="mp3foxPopoutButtonText" value="<?php echo $O['popout_button_title']; ?>" /></p>
700
  </div>
701
 
702
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op3','File Options');" id="fox_op3-toggle">File Options</a>-->
703
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op3','File Options');" id="fox_op3-toggle">File Options</a>
704
  <div id="fox_op3-list" class="jopbox">
705
+ <p><input type="checkbox" name="mp3foxHideExtension" value="true" <?php if ($O['hide_mp3extension'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Hide '.mp3' extension if a filename is displayed<br /><span class="description" style="margin-left:28px;">(filenames are displayed when there's no available titles)</span></p>
706
+ <p><input type="checkbox" name="mp3foxEncodeFiles" value="true" <?php if ($O['encode_files'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Encode URI's and filenames<br /><span class="description" style="margin-left:28px;">(provides some obfuscation of your urls in the page source)</span></p>
707
+ <p><input type="checkbox" name="mp3foxAllowRemote" value="true" <?php if ($O['allow_remoteMp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Allow playing of off-site mp3's<br /><span class="description" style="margin-left:28px;">(unchecking this option doesn't affect mp3's playing from a remote default folder if one is set above)</span></p>
708
  </div>
709
 
710
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>-->
715
  <p style="margin:10px 0 10px 0px;">Shortcode for 'Turn mp3 links into players' option:</p>
716
 
717
  <p style="margin:0px 0 20px 25px;"><textarea class="widefat" style="width:580px; height:100px;" name="make_player_from_link_shcode"><?php
718
+ $deslashed = str_replace('\"', '"', $O['make_player_from_link_shcode'] );
719
  echo $deslashed;
720
  ?></textarea><br /><span class="description">Can also include text/html. Placeholders:</span> <code>{TEXT}</code> <span class="description">- Link text,</span> <code>{URL}</code> <span class="description">- Link url.</span></p>
721
 
722
 
723
 
724
+ <p><input type="checkbox" name="mp3foxUseFixedCSS" value="true" <?php if ($O['use_fixed_css'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Bypass colour settings<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(colours can still be set in css)</span></p>
725
+ <p><input type="checkbox" name="disableTemplateTag" value="true" <?php if ($O['disable_template_tag'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Bypass player template-tags in theme files<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(ignores mp3j_addscripts() and mp3j_put() template functions)</span></p>
726
 
727
+ <?php $greyout_text = ( $O['disable_jquery_libs'] == "yes" ) ? ' style="color:#d6d6d6;"' : ''; ?>
728
+ <p<?php echo $greyout_text; ?>><input type="checkbox" name="touch_punch_js" value="true" <?php if ($O['touch_punch_js'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Include additional js for touch screen support<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description"<?php echo $greyout_text; ?>>(adds jquery.ui.touch-punch.js script)</span></p>
729
+ <p><input type="checkbox" name="mp3foxEchoDebug" value="true" <?php if ($O['echo_debug'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Turn on debug<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(info appears in the source view near the bottom)</span></p>
730
+ <?php $bgc = ( $O['disable_jquery_libs'] == "yes" ) ? "#fdd" : "#f9f9f9"; ?>
731
  <div style="margin: 20px 0px 10px 0px; padding:6px; background:<?php echo $bgc; ?>; border:1px solid #eee;">
732
+ <p style="margin:0 0 5px 18px;">Disable jQuery and jQuery-UI javascript libraries? &nbsp; <input type="text" style="width:60px;" name="disableJSlibs" value="<?php echo $O['disable_jquery_libs']; ?>" /></p>
733
  <p style="margin: 0 0 8px 18px;"><span class="description"><strong>CAUTION!!</strong> This option will bypass the request <strong>from this plugin only</strong> for both jQuery <strong>and</strong> jQuery-UI scripts,
734
  you <strong>MUST</strong> be providing these scripts from an alternative source.
735
  <br />Type <code>yes</code> in the box and save settings to bypass jQuery and jQuery-UI.</span></p>
737
  </div>
738
  </div><!-- close .joptionswrap -->
739
 
740
+ <p style="margin-top: 4px;"><input type="submit" name="update_mp3foxSettings" class="button-primary" value="<?php _e('Update Settings', $mp3_fox->textdomain ) ?>" /> &nbsp; Remember settings if plugin is deactivated &nbsp;<input type="checkbox" name="mp3foxRemember" value="true" <?php if ($O['remember_settings'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /></p>
741
+ <input id="fox_styling" type="hidden" name="MtogBox1" value="<?php echo $O['admin_toggle_1']; // Colour settings toggle state ?>" />
742
  <input type="hidden" name="mp3foxPluginVersion" value="<?php echo $mp3_fox->version_of_plugin; ?>" />
743
  </form><br />
744
  <div style="margin: 15px 120px 25px 0px; border-top: 1px solid #999; height: 30px;"><p class="description" style="margin: 0px 120px px 0px;"><a href="http://sjward.org/jplayer-for-wordpress">Plugin home page</a></p></div>
mp3j_frontend.php CHANGED
@@ -203,6 +203,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
203
  'bold' => 'y',
204
  'play' => 'Play',
205
  'track' => '',
 
206
  'caption' => '',
207
  'flip' => 'l',
208
  'title' => '#USE#',
@@ -218,7 +219,11 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
218
  ), $atts));
219
 
220
  $cssclass = $style;
221
-
 
 
 
 
222
  $tn = $this->decide_S_playlist( $track, $caption );
223
  if ( !$tn ) {
224
  $this->dbug['str'] .= "\nExiting (no track here)";
@@ -285,6 +290,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
285
  extract(shortcode_atts(array( // Defaults
286
  'bold' => 'y',
287
  'track' => '',
 
288
  'caption' => '',
289
  'flip' => 'r',
290
  'title' => '#USE#',
@@ -299,7 +305,11 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
299
  ), $atts));
300
 
301
  $cssclass = $style;
302
-
 
 
 
 
303
  $tn = $this->decide_S_playlist( $track, $caption );
304
  if ( !$tn ) {
305
  $this->dbug['str'] .= "\nExiting (no track here)";
@@ -385,6 +395,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
385
  $pID = $this->Player_ID;
386
  extract(shortcode_atts(array( // Defaults
387
  'tracks' => '',
 
388
  'captions' => '',
389
  'dload' => $this->theSettings['show_downloadmp3'],
390
  'title' => '',
@@ -409,6 +420,10 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
409
 
410
  $cssclass = $style;
411
 
 
 
 
 
412
  $Npl = $this->decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle, $images, $imglinks );
413
  if ( !$Npl ) {
414
  $this->dbug['str'] .= "\nExiting (no tracks here)";
@@ -489,6 +504,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
489
  $pID = $this->Player_ID;
490
  extract(shortcode_atts(array( // Defaults
491
  'tracks' => '',
 
492
  'captions' => '',
493
  'dload' => $this->theSettings['show_downloadmp3'],
494
  'title' => '',
@@ -512,6 +528,10 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
512
 
513
  $cssclass = $style;
514
 
 
 
 
 
515
  $Npl = $this->decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle, $images, $imglinks );
516
  if ( !$Npl ) {
517
  $this->dbug['str'] .= "\nExiting (no tracks here)";
@@ -534,7 +554,8 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
534
  $dload_info = ( $dload == "true" || $dload == "y" || $dload == "1" ) ? "true" : "false";
535
  $autoplay = ( $autoplay == "true" || $autoplay == "y" || $autoplay == "1" ) ? "true" : "false";
536
  $loop = ( $loop == "true" || $loop == "y" || $loop == "1" ) ? "true" : "false";
537
- $this->JS['players'][] = "{ list: MP3J_PLAYLISTS." . $PlayerName . ", tr:0, type:'popout', lstate:" . $list . ", loop:" . $loop . ", play_txt:'" . $play . "', pause_txt:'', pp_title:'" . $pp_title . "', autoplay:false, download:" . $dload_info . ", vol:" . $vol . ", height:" . $pp_height . ", cssclass: '" . $cssclass . "' }";
 
538
 
539
  //Make it
540
  $image_h = ( $image == "" ) ? "<div class=\"mp3j-popout-link\"></div>" : "<img style=\"float:left; margin-right:10px;\" src=\"" . $image . "\" />";
203
  'bold' => 'y',
204
  'play' => 'Play',
205
  'track' => '',
206
+ 'tracks' => '',
207
  'caption' => '',
208
  'flip' => 'l',
209
  'title' => '#USE#',
219
  ), $atts));
220
 
221
  $cssclass = $style;
222
+
223
+ if ( $track == '' && $tracks != '' ) {
224
+ $track = $tracks;
225
+ }
226
+
227
  $tn = $this->decide_S_playlist( $track, $caption );
228
  if ( !$tn ) {
229
  $this->dbug['str'] .= "\nExiting (no track here)";
290
  extract(shortcode_atts(array( // Defaults
291
  'bold' => 'y',
292
  'track' => '',
293
+ 'tracks' => '',
294
  'caption' => '',
295
  'flip' => 'r',
296
  'title' => '#USE#',
305
  ), $atts));
306
 
307
  $cssclass = $style;
308
+
309
+ if ( $track == '' && $tracks != '' ) {
310
+ $track = $tracks;
311
+ }
312
+
313
  $tn = $this->decide_S_playlist( $track, $caption );
314
  if ( !$tn ) {
315
  $this->dbug['str'] .= "\nExiting (no track here)";
395
  $pID = $this->Player_ID;
396
  extract(shortcode_atts(array( // Defaults
397
  'tracks' => '',
398
+ 'track' => '',
399
  'captions' => '',
400
  'dload' => $this->theSettings['show_downloadmp3'],
401
  'title' => '',
420
 
421
  $cssclass = $style;
422
 
423
+ if ( $tracks == '' && $track != '' ) {
424
+ $tracks = $track;
425
+ }
426
+
427
  $Npl = $this->decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle, $images, $imglinks );
428
  if ( !$Npl ) {
429
  $this->dbug['str'] .= "\nExiting (no tracks here)";
504
  $pID = $this->Player_ID;
505
  extract(shortcode_atts(array( // Defaults
506
  'tracks' => '',
507
+ 'track' => '',
508
  'captions' => '',
509
  'dload' => $this->theSettings['show_downloadmp3'],
510
  'title' => '',
528
 
529
  $cssclass = $style;
530
 
531
+ if ( $tracks == '' && $track != '' ) {
532
+ $tracks = $track;
533
+ }
534
+
535
  $Npl = $this->decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle, $images, $imglinks );
536
  if ( !$Npl ) {
537
  $this->dbug['str'] .= "\nExiting (no tracks here)";
554
  $dload_info = ( $dload == "true" || $dload == "y" || $dload == "1" ) ? "true" : "false";
555
  $autoplay = ( $autoplay == "true" || $autoplay == "y" || $autoplay == "1" ) ? "true" : "false";
556
  $loop = ( $loop == "true" || $loop == "y" || $loop == "1" ) ? "true" : "false";
557
+ //$this->JS['players'][] = "{ list: MP3J_PLAYLISTS." . $PlayerName . ", tr:0, type:'popout', lstate:" . $list . ", loop:" . $loop . ", play_txt:'" . $play . "', pause_txt:'', pp_title:'" . $pp_title . "', autoplay:false, download:" . $dload_info . ", vol:" . $vol . ", height:" . $pp_height . ", cssclass: '" . $cssclass . "' }";
558
+ $this->JS['players'][] = "{ list: MP3J_PLAYLISTS." . $PlayerName . ", tr:0, type:'popout', lstate:" . $list . ", loop:" . $loop . ", play_txt:'" . $play . "', pause_txt:'', pp_title:'" . $pp_title . "', autoplay:" . $autoplay . ", download:" . $dload_info . ", vol:" . $vol . ", height:" . $pp_height . ", cssclass: '" . $cssclass . "' }";
559
 
560
  //Make it
561
  $image_h = ( $image == "" ) ? "<div class=\"mp3j-popout-link\"></div>" : "<img style=\"float:left; margin-right:10px;\" src=\"" . $image . "\" />";
mp3j_main.php CHANGED
@@ -2,7 +2,7 @@
2
  if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
3
 
4
  // ---------------------- Update Me
5
- var $version_of_plugin = "1.8.6";
6
  var $M_no = 0;
7
  var $F_no = 0;
8
  var $S_no = 0;
@@ -248,6 +248,10 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
248
 
249
  /* Adds any FEEDs into K's/V's */
250
  function collect_delete_feeds( $values, $keys ){
 
 
 
 
251
  foreach ( $values as $i => $val ) {
252
  if ( preg_match( "!^FEED:(DF|ID|LIB|/.*)$!i", $val ) == 1 ) { // keep ID for backwards compat
253
  $feedV = stristr( $val, ":" );
@@ -421,7 +425,14 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
421
  /* Looks for any active widget that isn't ruled out by
422
  the page filter. Returns true if finds a widget that will be building. */
423
  function has_allowed_widget( $type ) {
424
- $SBsettings = get_option('sidebars_widgets');
 
 
 
 
 
 
 
425
  if ( empty($SBsettings) || is_null($SBsettings) ) { return false; }
426
 
427
  $active = array();
@@ -435,7 +446,9 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
435
  }
436
  }
437
  }
 
438
  $this->dbug['arr'][] = $active;
 
439
  if ( !empty($active) ) {
440
  $name = "widget_". $type;
441
  $ops = get_option($name);
@@ -636,8 +649,8 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
636
  $this->dbug['str'] .= "\nScripts are OFF (jQuery & UI)";
637
  }
638
  //jplayer and plugin js
639
- wp_enqueue_script( 'jquery.jplayer.min', $this->PluginFolder . '/js/jquery.jplayer.min2-5-0.js', false, '2.5.0' );
640
- wp_enqueue_script( 'mp3-jplayer', $this->PluginFolder . '/js/mp3-jplayer-1.8.5.js', false, '1.8.5' );
641
  //css
642
  if ( $theme == "styleF" ) { $themepath = $this->PluginFolder . "/css/players-1-8-silver.css"; }
643
  elseif ( $theme == "styleG" ) { $themepath = $this->PluginFolder . "/css/players-1-8-dark.css"; }
@@ -1036,29 +1049,77 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
1036
  }
1037
 
1038
  /* Adds css to settings page. */
1039
- function mp3j_admin_header() {
 
1040
  echo "\n<link rel=\"stylesheet\" href=\"" . $this->PluginFolder . "/css/mp3j-admin-1.8.css\" type=\"text/css\" media=\"screen\" />\n";
1041
  }
1042
 
1043
  /* Adds js to settings page. */
1044
- function mp3j_admin_footer() {
 
1045
  echo "\n<script type=\"text/javascript\" src=\"" . $this->PluginFolder . "/js/mp3j-admin-1.8.js\"></script>";
1046
  }
1047
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1048
  /* Preps path/uri option on settings page prior to saving. */
1049
  function prep_path ( $field ) {
1050
- $option = preg_replace( "!^www*\.!", "http://www.", $field );
1051
- if ( strpos($option, "http://") === false && strpos($option, "https://") === false) {
1052
- if (preg_match("!^/!", $option) == 0) {
 
 
 
 
 
 
1053
  $option = "/" . $option;
1054
  } else {
1055
- $option = preg_replace("!^/+!", "/", $option);
1056
  }
1057
  }
1058
- if (preg_match("!.+/+$!", $option) == 1) {
 
1059
  $option = preg_replace("!/+$!", "", $option);
1060
  }
1061
- if ($option == "") {
1062
  $option = "/";
1063
  }
1064
  return $option;
2
  if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
3
 
4
  // ---------------------- Update Me
5
+ var $version_of_plugin = "1.8.8";
6
  var $M_no = 0;
7
  var $F_no = 0;
8
  var $S_no = 0;
248
 
249
  /* Adds any FEEDs into K's/V's */
250
  function collect_delete_feeds( $values, $keys ){
251
+
252
+ $Vs = array();
253
+ $Ks = array();
254
+
255
  foreach ( $values as $i => $val ) {
256
  if ( preg_match( "!^FEED:(DF|ID|LIB|/.*)$!i", $val ) == 1 ) { // keep ID for backwards compat
257
  $feedV = stristr( $val, ":" );
425
  /* Looks for any active widget that isn't ruled out by
426
  the page filter. Returns true if finds a widget that will be building. */
427
  function has_allowed_widget( $type ) {
428
+
429
+ //$SBsettings = get_option('sidebars_widgets');
430
+ global $_wp_sidebars_widgets;
431
+ if ( empty($_wp_sidebars_widgets) ) {
432
+ $SBsettings = get_option('sidebars_widgets', array());
433
+ } else {
434
+ $SBsettings = $_wp_sidebars_widgets;
435
+ }
436
  if ( empty($SBsettings) || is_null($SBsettings) ) { return false; }
437
 
438
  $active = array();
446
  }
447
  }
448
  }
449
+
450
  $this->dbug['arr'][] = $active;
451
+
452
  if ( !empty($active) ) {
453
  $name = "widget_". $type;
454
  $ops = get_option($name);
649
  $this->dbug['str'] .= "\nScripts are OFF (jQuery & UI)";
650
  }
651
  //jplayer and plugin js
652
+ wp_enqueue_script( 'jquery.jplayer.min', $this->PluginFolder . '/js/jquery.jplayer.min2-6-0.js', false, '2.6.0' );
653
+ wp_enqueue_script( 'mp3-jplayer', $this->PluginFolder . '/js/mp3-jplayer-1.8.8.js', false, '1.8.8' );
654
  //css
655
  if ( $theme == "styleF" ) { $themepath = $this->PluginFolder . "/css/players-1-8-silver.css"; }
656
  elseif ( $theme == "styleG" ) { $themepath = $this->PluginFolder . "/css/players-1-8-dark.css"; }
1049
  }
1050
 
1051
  /* Adds css to settings page. */
1052
+ function mp3j_admin_header()
1053
+ {
1054
  echo "\n<link rel=\"stylesheet\" href=\"" . $this->PluginFolder . "/css/mp3j-admin-1.8.css\" type=\"text/css\" media=\"screen\" />\n";
1055
  }
1056
 
1057
  /* Adds js to settings page. */
1058
+ function mp3j_admin_footer()
1059
+ {
1060
  echo "\n<script type=\"text/javascript\" src=\"" . $this->PluginFolder . "/js/mp3j-admin-1.8.js\"></script>";
1061
  }
1062
 
1063
+
1064
+
1065
+ function prep_value ( $field )
1066
+ {
1067
+ $search = array( "'", '"', '\\' );
1068
+ $option = str_replace( $search, "", $field );
1069
+ $option = strip_tags( $option );
1070
+ return $option;
1071
+ }
1072
+
1073
+
1074
+
1075
+ function prep_text ( $field )
1076
+ {
1077
+ $search = array(
1078
+ '@<script[^>]*?>.*?</script>@si', // Strip out javascript
1079
+ '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
1080
+ '@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA
1081
+ );
1082
+
1083
+ $text = preg_replace( $search, '', $field );
1084
+ return $text;
1085
+ }
1086
+
1087
+
1088
+ function strip_scripts ( $field )
1089
+ {
1090
+ $search = array(
1091
+ '@<script[^>]*?>.*?</script>@si', // Strip out javascript
1092
+ '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
1093
+ '@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA
1094
+ );
1095
+
1096
+ $text = preg_replace( $search, '', $field );
1097
+ return $text;
1098
+ }
1099
+
1100
+
1101
+
1102
  /* Preps path/uri option on settings page prior to saving. */
1103
  function prep_path ( $field ) {
1104
+
1105
+ $search = array( "'", '"', ';', '\\' );
1106
+ $option = str_replace( $search, "", $field );
1107
+ $option = strip_tags( $option );
1108
+ $option = preg_replace( "!^www*\.!", "http://www.", $option ); //add default protocol if admin didn't
1109
+
1110
+ if ( strpos($option, "http://") === false && strpos($option, "https://") === false) { //if local path was entered
1111
+
1112
+ if (preg_match("!^/!", $option) == 0) { //if there was no starting slash then add one
1113
  $option = "/" . $option;
1114
  } else {
1115
+ $option = preg_replace("!^/+!", "/", $option); //or just make sure theres only one
1116
  }
1117
  }
1118
+
1119
+ if (preg_match("!.+/+$!", $option) == 1) { //remove any ending slashes
1120
  $option = preg_replace("!/+$!", "", $option);
1121
  }
1122
+ if ($option == "") { //set to domain root
1123
  $option = "/";
1124
  }
1125
  return $option;
mp3j_sc-widget.php CHANGED
@@ -26,15 +26,22 @@ if ( class_exists("WP_Widget") ) {
26
  function widget( $args, $instance ) {
27
  if ( !is_home() && !is_archive() && !is_singular() && !is_search() ) { return; }
28
  global $mp3_fox;
29
- if ( $mp3_fox->page_filter( $instance['restrict_list'], $instance['restrict_mode'] ) ) { return; }
 
 
30
 
31
  $mp3_fox->Caller = "widget";
32
- $shortcodes_return = do_shortcode( $instance['arb_text'] );
 
 
 
33
  $mp3_fox->Caller = false;
34
 
35
  extract( $args ); // supplied WP theme vars
36
  echo $before_widget;
37
- if ( $instance['title'] ) { echo $before_title . $instance['title'] . $after_title; }
 
 
38
  echo $shortcodes_return;
39
  echo $after_widget;
40
  return;
@@ -42,11 +49,14 @@ if ( class_exists("WP_Widget") ) {
42
 
43
  /* Updates the widget settings (required by api) */
44
  function update( $new_instance, $old_instance ) {
 
 
 
45
  $instance = $old_instance;
46
- $instance['title'] = $new_instance['title'];
47
- $instance['restrict_list'] = $new_instance['restrict_list'];
48
- $instance['restrict_mode'] = $new_instance['restrict_mode'];
49
- $instance['arb_text'] = $new_instance['arb_text'];
50
  return $instance;
51
  }
52
 
@@ -63,15 +73,15 @@ if ( class_exists("WP_Widget") ) {
63
  <h3 style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="options-general.php?page=mp3jplayer.php">Plugin Options and Help</a></h3>
64
  <p style="margin-top:-18px; margin-bottom:4px;">Shortcodes:</p>
65
  <!-- Arbitrary text/shortcodes -->
66
- <p style="margin:8px 0 10px 0; font-size: 11px;"><textarea class="widefat" style="font-size:11px;" rows="8" cols="85" id="<?php echo $this->get_field_id( 'arb_text' ); ?>" name="<?php echo $this->get_field_name( 'arb_text' ); ?>"><?php echo $instance['arb_text']; ?></textarea></p>
67
  <!-- Page Filter -->
68
  <p style="font-size: 11px; margin:10px 0px 4px 0px;">
69
  Include <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="include" <?php if ($instance['restrict_mode'] == "include") { _e('checked="checked"', "mp3jplayerwidget2"); }?> />
70
  or <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="exclude" <?php if ($instance['restrict_mode'] == "exclude") { _e('checked="checked"', "mp3jplayerwidget2"); }?> />
71
- Exclude pages &nbsp;<input class="widefat" style="font-size:11px; width:200px;" type="text" id="<?php echo $this->get_field_id( 'restrict_list' ); ?>" name="<?php echo $this->get_field_name( 'restrict_list' ); ?>" value="<?php echo $instance['restrict_list']; ?>" /></p>
72
  <p class="description" style="font-size:11px; color:#999999; margin-top:4px; margin-bottom:1px;">A comma separated list, can use post ID's, <code>index</code>, <code>archive</code>, <code>post</code>, and <code>search</code>.</p>
73
  <!-- Widget Heading -->
74
- <p style="margin: -43px 0px 35px 420px; font-size:11px;">Widget Heading: <input style="width:260px;"class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /></p>
75
 
76
  <?php
77
  }
26
  function widget( $args, $instance ) {
27
  if ( !is_home() && !is_archive() && !is_singular() && !is_search() ) { return; }
28
  global $mp3_fox;
29
+ if ( $mp3_fox->page_filter( $instance['restrict_list'], $instance['restrict_mode'] ) ) {
30
+ return;
31
+ }
32
 
33
  $mp3_fox->Caller = "widget";
34
+
35
+ $arb_text = MP3j_Main::strip_scripts( $instance['arb_text'] );
36
+
37
+ $shortcodes_return = do_shortcode( $arb_text );
38
  $mp3_fox->Caller = false;
39
 
40
  extract( $args ); // supplied WP theme vars
41
  echo $before_widget;
42
+ if ( $instance['title'] ) {
43
+ echo $before_title . MP3j_Main::strip_scripts( $instance['title'] ) . $after_title;
44
+ }
45
  echo $shortcodes_return;
46
  echo $after_widget;
47
  return;
49
 
50
  /* Updates the widget settings (required by api) */
51
  function update( $new_instance, $old_instance ) {
52
+
53
+
54
+
55
  $instance = $old_instance;
56
+ $instance['title'] = MP3j_Main::strip_scripts( $new_instance['title'] );
57
+ $instance['restrict_list'] = MP3j_Main::strip_scripts( $new_instance['restrict_list'] );
58
+ $instance['restrict_mode'] = MP3j_Main::strip_scripts( $new_instance['restrict_mode'] );
59
+ $instance['arb_text'] = MP3j_Main::strip_scripts( $new_instance['arb_text'] );
60
  return $instance;
61
  }
62
 
73
  <h3 style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="options-general.php?page=mp3jplayer.php">Plugin Options and Help</a></h3>
74
  <p style="margin-top:-18px; margin-bottom:4px;">Shortcodes:</p>
75
  <!-- Arbitrary text/shortcodes -->
76
+ <p style="margin:8px 0 10px 0; font-size: 11px;"><textarea class="widefat" style="font-size:11px;" rows="8" cols="85" id="<?php echo $this->get_field_id( 'arb_text' ); ?>" name="<?php echo $this->get_field_name( 'arb_text' ); ?>"><?php echo MP3j_Main::strip_scripts( $instance['arb_text'] ); ?></textarea></p>
77
  <!-- Page Filter -->
78
  <p style="font-size: 11px; margin:10px 0px 4px 0px;">
79
  Include <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="include" <?php if ($instance['restrict_mode'] == "include") { _e('checked="checked"', "mp3jplayerwidget2"); }?> />
80
  or <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="exclude" <?php if ($instance['restrict_mode'] == "exclude") { _e('checked="checked"', "mp3jplayerwidget2"); }?> />
81
+ Exclude pages &nbsp;<input type="text" class="widefat" style="font-size:11px; width:200px;" id="<?php echo $this->get_field_id( 'restrict_list' ); ?>" name="<?php echo $this->get_field_name( 'restrict_list' ); ?>" value="<?php echo MP3j_Main::strip_scripts( $instance['restrict_list'] ); ?>" /></p>
82
  <p class="description" style="font-size:11px; color:#999999; margin-top:4px; margin-bottom:1px;">A comma separated list, can use post ID's, <code>index</code>, <code>archive</code>, <code>post</code>, and <code>search</code>.</p>
83
  <!-- Widget Heading -->
84
+ <p style="margin: 0px 0px 35px 0px; font-size:11px;">Widget Heading: <input style="width:260px;"class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo MP3j_Main::strip_scripts( $instance['title'] ); ?>" /></p>
85
 
86
  <?php
87
  }
mp3j_widget.php CHANGED
@@ -329,7 +329,7 @@ if ( class_exists("WP_Widget") ) {
329
  or <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="exclude" <?php if ($instance['restrict_mode'] == "exclude") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
330
  Exclude pages &nbsp;<input class="widefat" style="font-size:11px; width:200px;" type="text" id="<?php echo $this->get_field_id( 'restrict_list' ); ?>" name="<?php echo $this->get_field_name( 'restrict_list' ); ?>" value="<?php echo $instance['restrict_list']; ?>" /></p>
331
  <p class="description" style="font-size:11px; margin-top:4px; margin-bottom:1px; <?php echo $helptext_col; ?>">A comma separated list, can use post ID's, <code>index</code>, <code>archive</code>, <code>post</code>, and <code>search</code>.</p>
332
- <p style="margin: -43px 0px 25px 420px; font-size: 11px;">Widget Heading: <input class="widefat" style="width:260px;" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /></p>
333
 
334
  <?php
335
  }
329
  or <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="exclude" <?php if ($instance['restrict_mode'] == "exclude") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
330
  Exclude pages &nbsp;<input class="widefat" style="font-size:11px; width:200px;" type="text" id="<?php echo $this->get_field_id( 'restrict_list' ); ?>" name="<?php echo $this->get_field_name( 'restrict_list' ); ?>" value="<?php echo $instance['restrict_list']; ?>" /></p>
331
  <p class="description" style="font-size:11px; margin-top:4px; margin-bottom:1px; <?php echo $helptext_col; ?>">A comma separated list, can use post ID's, <code>index</code>, <code>archive</code>, <code>post</code>, and <code>search</code>.</p>
332
+ <p style="margin: 0px 0px 25px 0px; font-size: 11px;">Widget Heading: <input class="widefat" style="width:260px;" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /></p>
333
 
334
  <?php
335
  }
mp3jplayer.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://sjward.org/jplayer-for-wordpress
5
- Description: Add mp3 players to posts, pages, and sidebars. HTML5 with Flash fall back. Shortcodes, widgets, and template tags. See the help on the Settings Page for a full list of options.
6
- Version: 1.8.6
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
@@ -102,7 +102,7 @@ if ( isset($mp3_fox) ) {
102
 
103
  // template hooks
104
  add_action('wp_head', array(&$mp3_fox, 'header_scripts_handler'), 2);
105
- add_action('wp_footer', array(&$mp3_fox, 'footercode_handler'));
106
  add_action('mp3j_put', array(&$mp3_fox, 'template_tag_handler'), 10, 1 );
107
  add_action('mp3j_addscripts', array(&$mp3_fox, 'scripts_tag_handler'), 1, 1 );
108
  add_filter('mp3j_grab_library', array(&$mp3_fox, 'grablibrary_handler'), 10, 1 );
2
  /*
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://sjward.org/jplayer-for-wordpress
5
+ Description: Add HTML5 mp3 players to posts, pages, and sidebars. Has a Flash fall back. Use shortcodes, widgets, and template tags. See help on the Settings Page for a full list of options.
6
+ Version: 1.8.8
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
102
 
103
  // template hooks
104
  add_action('wp_head', array(&$mp3_fox, 'header_scripts_handler'), 2);
105
+ add_action('wp_footer', array(&$mp3_fox, 'footercode_handler'), 200); //process this late (enqueues are priority 20, must be after this!)
106
  add_action('mp3j_put', array(&$mp3_fox, 'template_tag_handler'), 10, 1 );
107
  add_action('mp3j_addscripts', array(&$mp3_fox, 'scripts_tag_handler'), 1, 1 );
108
  add_filter('mp3j_grab_library', array(&$mp3_fox, 'grablibrary_handler'), 10, 1 );
popout.php CHANGED
@@ -3,17 +3,17 @@
3
  <head>
4
  <title></title>
5
 
6
- <!-- MP3-jPlayer 1.8.6 --->
7
 
8
  <script type='text/javascript' src='js/jquery.js'></script>
9
  <script type='text/javascript' src='js/ui.core.js'></script>
10
  <script type='text/javascript' src='js/ui.widget.js'></script>
11
  <script type='text/javascript' src='js/ui.mouse.js'></script>
12
  <script type='text/javascript' src='js/ui.slider.js'></script>
13
- <script type='text/javascript' src='js/jquery.jplayer.min2-5-0.js'></script>
14
  <script type='text/javascript' src='js/jquery.ui.touch-punch.min.js'></script>
15
 
16
- <script type='text/javascript' src='js/mp3-jplayer-1.8.5.js'></script>
17
 
18
  <script type='text/javascript'>
19
 
@@ -36,24 +36,27 @@ if( window.opener && !window.opener.closed && window.opener.MP3_JPLAYER && windo
36
  MP3_JPLAYER.launched_ID = window.opener.MP3_JPLAYER.launched_ID;
37
  MP3_JPLAYER.vars.dload_text = window.opener.MP3_JPLAYER.vars.dload_text;
38
  MP3_JPLAYER.vars.force_dload = window.opener.MP3_JPLAYER.vars.force_dload;
39
- //MP3_JPLAYER.vars.force_dl_remote = window.opener.MP3_JPLAYER.vars.force_dl_remote;
40
  MP3_JPLAYER.vars.dl_remote_path = window.opener.MP3_JPLAYER.vars.dl_remote_path;
41
 
42
  var pl_info_wo = window.opener.MP3_JPLAYER.pl_info; //copy
 
 
 
43
  MP3_JPLAYER.pl_info = [{
44
- list:pl_info_wo[MP3_JPLAYER.launched_ID].list,
45
- tr:pl_info_wo[MP3_JPLAYER.launched_ID].tr,
46
- type:'MI',
47
- lstate:pl_info_wo[MP3_JPLAYER.launched_ID].lstate,
48
- loop:pl_info_wo[MP3_JPLAYER.launched_ID].loop,
49
- play_txt:pl_info_wo[MP3_JPLAYER.launched_ID].play_txt,
50
- pause_txt:pl_info_wo[MP3_JPLAYER.launched_ID].pause_txt,
51
- pp_title:pl_info_wo[MP3_JPLAYER.launched_ID].pp_title,
52
- autoplay:pl_info_wo[MP3_JPLAYER.launched_ID].autoplay,
53
- download:pl_info_wo[MP3_JPLAYER.launched_ID].download,
54
- vol:pl_info_wo[MP3_JPLAYER.launched_ID].vol,
55
- height:pl_info_wo[MP3_JPLAYER.launched_ID].height,
56
- cssclass:pl_info_wo[MP3_JPLAYER.launched_ID].cssclass
 
57
  }];
58
 
59
  MP3_JPLAYER.vars.pp_playerheight = window.opener.MP3_JPLAYER.vars.pp_playerheight;
3
  <head>
4
  <title></title>
5
 
6
+ <!-- MP3-jPlayer 1.8.8 --->
7
 
8
  <script type='text/javascript' src='js/jquery.js'></script>
9
  <script type='text/javascript' src='js/ui.core.js'></script>
10
  <script type='text/javascript' src='js/ui.widget.js'></script>
11
  <script type='text/javascript' src='js/ui.mouse.js'></script>
12
  <script type='text/javascript' src='js/ui.slider.js'></script>
13
+ <script type='text/javascript' src='js/jquery.jplayer.min2-6-0.js'></script>
14
  <script type='text/javascript' src='js/jquery.ui.touch-punch.min.js'></script>
15
 
16
+ <script type='text/javascript' src='js/mp3-jplayer-1.8.8.js'></script>
17
 
18
  <script type='text/javascript'>
19
 
36
  MP3_JPLAYER.launched_ID = window.opener.MP3_JPLAYER.launched_ID;
37
  MP3_JPLAYER.vars.dload_text = window.opener.MP3_JPLAYER.vars.dload_text;
38
  MP3_JPLAYER.vars.force_dload = window.opener.MP3_JPLAYER.vars.force_dload;
 
39
  MP3_JPLAYER.vars.dl_remote_path = window.opener.MP3_JPLAYER.vars.dl_remote_path;
40
 
41
  var pl_info_wo = window.opener.MP3_JPLAYER.pl_info; //copy
42
+ var auto_play = ( window.opener.MP3_JPLAYER.was_playing !== 'undefined' && window.opener.MP3_JPLAYER.was_playing === true ) ? true : pl_info_wo[MP3_JPLAYER.launched_ID].autoplay;
43
+ window.opener.MP3_JPLAYER.was_playing = false;
44
+
45
  MP3_JPLAYER.pl_info = [{
46
+ list: pl_info_wo[MP3_JPLAYER.launched_ID].list,
47
+ tr: pl_info_wo[MP3_JPLAYER.launched_ID].tr,
48
+ type: 'MI',
49
+ lstate: pl_info_wo[MP3_JPLAYER.launched_ID].lstate,
50
+ loop: pl_info_wo[MP3_JPLAYER.launched_ID].loop,
51
+ play_txt: pl_info_wo[MP3_JPLAYER.launched_ID].play_txt,
52
+ pause_txt: pl_info_wo[MP3_JPLAYER.launched_ID].pause_txt,
53
+ pp_title: pl_info_wo[MP3_JPLAYER.launched_ID].pp_title,
54
+ //autoplay: pl_info_wo[MP3_JPLAYER.launched_ID].autoplay,
55
+ autoplay: auto_play,
56
+ download: pl_info_wo[MP3_JPLAYER.launched_ID].download,
57
+ vol: pl_info_wo[MP3_JPLAYER.launched_ID].vol,
58
+ height: pl_info_wo[MP3_JPLAYER.launched_ID].height,
59
+ cssclass: pl_info_wo[MP3_JPLAYER.launched_ID].cssclass
60
  }];
61
 
62
  MP3_JPLAYER.vars.pp_playerheight = window.opener.MP3_JPLAYER.vars.pp_playerheight;
readme.txt CHANGED
@@ -5,34 +5,34 @@ Contributors: simon.ward
5
  Donate link: http://www.sjward.org/jplayer-for-wordpress
6
  Tags: mp3, mp3 player, music player, audio, audio player, jplayer, playlist, jquery, shortcode, widget, css, post, page, sidebar, html5
7
  Requires at least: 2.8
8
- Tested up to: 3.8.1
9
- Stable tag: 1.8.6
10
 
11
 
12
- Add mp3 audio players to posts, pages, and sidebars. HTML5 / Flash. Uses jPlayer.
13
 
14
  == Description ==
15
 
16
  - Flexible multi-player plugin.
17
- - Playlist and single-file players.
18
- - Pop-out player.
19
- - Individual control of height, width, volume, download etc.
20
  - Customise the colour scheme on the settings page.
21
- - Uses a single instance of [jPlayer by Happyworm](http://jplayer.org/)
22
- - Good compatibility across browsers/platforms. Works on iPhone 4, iPad. Uses HTML 5 or Flash if necessary.
23
  - Editable player designs via CSS.
24
  - Multisite compatible.
25
 
26
  [View Demo here](http://sjward.org/jplayer-for-wordpress)
27
 
28
  <br />
29
- This plugin lets you add mp3 players to your site using shortcodes, widgets, link replacement, and template tags. There's useful stuff on the settings page such as default folder setting, mp3 file lists, and plenty of shortcode parameters to control things like width, height, autoplay, volume etc.
30
 
31
  You can play entire folders with one simple command, or the library, or make playlists track by track, randomise them, add titles and captions (or use the library ones), set playlists for download, hide your urls.
32
 
33
- Widgets and tags can automatically pick up your track lists from posts/pages, or have their own playlists.
34
 
35
- As only the one instance of jPlayer is created there's no loss of performance or speed however many players you put on a page.
36
 
37
 
38
  <br />
@@ -106,7 +106,7 @@ Install manually:
106
  Just mp3 files.
107
 
108
  = Theme requirements? =
109
- Themes need the wp_head() and wp_footer() calls in them.
110
 
111
  = Mp3 encoding? =
112
  Mp3's should be constant bit-rate (CBR) encoded at sample rates 44.1kHz, 22.05 kHz, 11.025 kHz, though variable bit-rate (VBR) files seem to work ok.
@@ -139,6 +139,17 @@ Either on the forum at Wordpress, or [here](http://sjward.org/contact).
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
 
 
 
 
 
142
  = 1.8.6 =
143
  * Correct popout script references (apologies, missed in the last update meaning the popout didn't function).
144
 
@@ -282,8 +293,4 @@ Either on the forum at Wordpress, or [here](http://sjward.org/contact).
282
  * Fixed bug where using unescaped double quotes in a title broke the playlist, quotes are now escaped automatically and can be used.
283
 
284
  = 1.0 =
285
- * First release
286
-
287
-
288
- == Upgrade Notice ==
289
- This is a security maintenance release, please update if you're running an older version of this plugin.
5
  Donate link: http://www.sjward.org/jplayer-for-wordpress
6
  Tags: mp3, mp3 player, music player, audio, audio player, jplayer, playlist, jquery, shortcode, widget, css, post, page, sidebar, html5
7
  Requires at least: 2.8
8
+ Tested up to: 3.8.3
9
+ Stable tag: 1.8.8
10
 
11
 
12
+ Add HTML5 audio mp3 players to posts, pages, and sidebars. HTML 5 / Flash fallback.
13
 
14
  == Description ==
15
 
16
  - Flexible multi-player plugin.
17
+ - Supports playback via HTML5 when possible, and has an automatic Flash fallback for other browsers.
18
+ - Add unlimited Playlist and single-file players into pages, posts, widgets, and template files.
19
+ - Has a fully integrated Pop-out player that can be launched from playlist players, or from a stand-alone link.
20
  - Customise the colour scheme on the settings page.
21
+ - Shortcode parameters give you individual control of player heights, widths, volumes, downloads etc.
22
+ - Great compatibility across browsers / platforms with just a single file format. Works on iPhone, iPad, Android (2.3), Uses HTML 5 or Flash if necessary.
23
  - Editable player designs via CSS.
24
  - Multisite compatible.
25
 
26
  [View Demo here](http://sjward.org/jplayer-for-wordpress)
27
 
28
  <br />
29
+ This plugin lets you add mp3 players to your site using shortcodes, widgets, link replacement, and template tags. There's lots of useful stuff on the settings page such as default folder setting, mp3 file lists, and plenty of shortcode parameters.
30
 
31
  You can play entire folders with one simple command, or the library, or make playlists track by track, randomise them, add titles and captions (or use the library ones), set playlists for download, hide your urls.
32
 
33
+ Widgets and tags can automatically pick up your track lists from posts/pages (via custom fields), or have their own playlists.
34
 
35
+ As only the one instance of the jPlayer engine is created there's no loss of performance or speed however many players you put on a page.
36
 
37
 
38
  <br />
106
  Just mp3 files.
107
 
108
  = Theme requirements? =
109
+ Themes need the standard wp_head() and wp_footer() calls in them.
110
 
111
  = Mp3 encoding? =
112
  Mp3's should be constant bit-rate (CBR) encoded at sample rates 44.1kHz, 22.05 kHz, 11.025 kHz, though variable bit-rate (VBR) files seem to work ok.
139
 
140
  == Changelog ==
141
 
142
+ = 1.8.8 =
143
+ * Updated jQuery.jPlayer to 2.6.0.
144
+ * Improved admin-side security.
145
+ * Fixed compatibility with 'Scripts to Footer' plugin.
146
+ * Fixed a routine that could throw a php warning.
147
+
148
+ = 1.8.7 =
149
+ * Fixed autoplay in the popout when using the popout shortcode [mp3-popout].
150
+ * Improved widget detection for scripts to allow for core's wp_convert_widget_settings.
151
+ * Sorted the overlapping field on widget interface.
152
+
153
  = 1.8.6 =
154
  * Correct popout script references (apologies, missed in the last update meaning the popout didn't function).
155
 
293
  * Fixed bug where using unescaped double quotes in a title broke the playlist, quotes are now escaped automatically and can be used.
294
 
295
  = 1.0 =
296
+ * First release