Version Description
Fix popout.
Add support for players in hidden elements (it's now handled automatically).
Start admin improvements (settings is now a top level menu).
Download this release
Release Info
Developer | simon.ward |
Plugin | MP3-jPlayer |
Version | 1.8.10 |
Comparing to | |
See all releases |
Code changes from version 1.8.9 to 1.8.10
- css/{mp3j-admin-1.8.css → admin-1.8.css} +64 -0
- css/player-silverALT.css +29 -0
- css/players-1-8-dark.css +31 -0
- css/players-1-8-silver.css +33 -0
- css/players-1-8-text.css +29 -0
- help.php +190 -0
- js/{mp3j-admin-1.8.js → admin-1.8.js} +1 -20
- js/jquery.jplayer.min2-6-0.js +0 -3
- js/mp3-jplayer-1.8.10.js +807 -0
- js/mp3-jplayer-1.8.8.js +0 -1552
- js/mp3-jplayer-1.8.9.js +31 -0
- mp3j_admin.php +361 -421
- mp3j_frontend.php +1 -0
- mp3j_main.php +1299 -1
- mp3j_sc-widget.php +1 -1
- mp3j_widget.php +1 -1
- mp3jplayer.php +130 -118
- popout.php +4 -1
- readme.txt +304 -10
css/{mp3j-admin-1.8.css → admin-1.8.css}
RENAMED
@@ -1,3 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#pickerwrap { position:relative; padding: 0px; background: #444; margin:30px 0px 0px 10px; width:380px; height:208px; border: 0px; }
|
2 |
.addcol { position:relative; border:1px solid #d8d8d8; background:#e6e6e6; color:#444; padding:3px 3px 4px 3px; cursor:pointer; font-size: 12px; font-weight: 700; width: 20px; -moz-border-radius: 4px; -webkit-border-radius: 4px; margin-left:0px; margin-right:11px; }
|
3 |
.addcol:hover { border:1px solid #e0e0e0; color:#666; background:#eee; }
|
1 |
+
|
2 |
+
|
3 |
+
|
4 |
+
/* --- Tabs --- */
|
5 |
+
.mp3j-tabbuttons-wrap {
|
6 |
+
position:relative;
|
7 |
+
border:0;
|
8 |
+
height:30px;
|
9 |
+
padding:5px 0 0 0;
|
10 |
+
width:auto;
|
11 |
+
border-bottom:1px solid #ccc;
|
12 |
+
overflow:visible;
|
13 |
+
}
|
14 |
+
.mp3j-tabbutton {
|
15 |
+
float:left;
|
16 |
+
padding:6px 24px 6px 22px;
|
17 |
+
font-size:11px; margin:0 2px 0 0; background:#e0e0e0; font-weight:700;
|
18 |
+
-webkit-border-top-left-radius: 3px;
|
19 |
+
-webkit-border-top-right-radius: 3px;
|
20 |
+
-moz-border-radius-topleft: 3px;
|
21 |
+
-moz-border-radius-topright: 3px;
|
22 |
+
border-top-left-radius: 3px;
|
23 |
+
border-top-right-radius: 3px;
|
24 |
+
border-bottom:1px solid #ccc;
|
25 |
+
cursor:pointer;
|
26 |
+
color:#777;
|
27 |
+
}
|
28 |
+
.active-tab {
|
29 |
+
background:#f0f0f0;
|
30 |
+
border:1px solid #ccc;
|
31 |
+
border-bottom:0px;
|
32 |
+
padding:5px 23px 7px 21px;
|
33 |
+
color:#333;
|
34 |
+
}
|
35 |
+
|
36 |
+
.mp3j-tabs-wrap {
|
37 |
+
position:relative;
|
38 |
+
height:auto;
|
39 |
+
border-bottom:1px solid #bbb;
|
40 |
+
}
|
41 |
+
.mp3j-tab {
|
42 |
+
position:relative;
|
43 |
+
height:auto;
|
44 |
+
padding:20px 0px 40px 25px;
|
45 |
+
background:#f0f0f0;
|
46 |
+
}
|
47 |
+
.tab-header { border-bottom:1px solid #ccc; padding:5px 0 10px 0; margin-bottom:15px; width:100%; }
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
/* ====================================================================================== */
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
#pickerwrap { position:relative; padding: 0px; background: #444; margin:30px 0px 0px 10px; width:380px; height:208px; border: 0px; }
|
66 |
.addcol { position:relative; border:1px solid #d8d8d8; background:#e6e6e6; color:#444; padding:3px 3px 4px 3px; cursor:pointer; font-size: 12px; font-weight: 700; width: 20px; -moz-border-radius: 4px; -webkit-border-radius: 4px; margin-left:0px; margin-right:11px; }
|
67 |
.addcol:hover { border:1px solid #e0e0e0; color:#666; background:#eee; }
|
css/player-silverALT.css
CHANGED
@@ -322,6 +322,35 @@
|
|
322 |
div.mp3j-finfo-txt a { }
|
323 |
|
324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
|
326 |
/*-------------------------
|
327 |
[mp3j] & [mp3t] SHORTCODES
|
322 |
div.mp3j-finfo-txt a { }
|
323 |
|
324 |
|
325 |
+
|
326 |
+
|
327 |
+
.mp3j-nosolution
|
328 |
+
{
|
329 |
+
position:absolute;
|
330 |
+
z-index:9999;
|
331 |
+
height:auto;
|
332 |
+
padding:5%;
|
333 |
+
border:1px solid #c0c0c0;
|
334 |
+
background:#f0f0f0;
|
335 |
+
color:#333;
|
336 |
+
top:4px;
|
337 |
+
left:4px;
|
338 |
+
right:4px;
|
339 |
+
-webkit-border-top-left-radius: 8px;
|
340 |
+
-webkit-border-top-right-radius: 8px;
|
341 |
+
-moz-border-radius-topleft: 8px;
|
342 |
+
-moz-border-radius-topright: 8px;
|
343 |
+
border-top-left-radius: 8px;
|
344 |
+
border-top-right-radius: 8px;
|
345 |
+
font-size:13px;
|
346 |
+
-webkit-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); -moz-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35);
|
347 |
+
}
|
348 |
+
|
349 |
+
.s-nosolution
|
350 |
+
{
|
351 |
+
}
|
352 |
+
|
353 |
+
|
354 |
|
355 |
/*-------------------------
|
356 |
[mp3j] & [mp3t] SHORTCODES
|
css/players-1-8-dark.css
CHANGED
@@ -172,6 +172,37 @@
|
|
172 |
|
173 |
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
/* backwards compat
|
177 |
------------------- */
|
172 |
|
173 |
|
174 |
|
175 |
+
|
176 |
+
|
177 |
+
|
178 |
+
|
179 |
+
.mp3j-nosolution
|
180 |
+
{
|
181 |
+
position:absolute;
|
182 |
+
z-index:9999;
|
183 |
+
height:auto;
|
184 |
+
padding:5%;
|
185 |
+
border:1px solid #c0c0c0;
|
186 |
+
background:#f0f0f0;
|
187 |
+
color:#333;
|
188 |
+
top:4px;
|
189 |
+
left:4px;
|
190 |
+
right:4px;
|
191 |
+
-webkit-border-top-left-radius: 8px;
|
192 |
+
-webkit-border-top-right-radius: 8px;
|
193 |
+
-moz-border-radius-topleft: 8px;
|
194 |
+
-moz-border-radius-topright: 8px;
|
195 |
+
border-top-left-radius: 8px;
|
196 |
+
border-top-right-radius: 8px;
|
197 |
+
font-size:13px;
|
198 |
+
-webkit-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); -moz-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35);
|
199 |
+
}
|
200 |
+
|
201 |
+
.s-nosolution
|
202 |
+
{
|
203 |
+
}
|
204 |
+
|
205 |
+
|
206 |
|
207 |
/* backwards compat
|
208 |
------------------- */
|
css/players-1-8-silver.css
CHANGED
@@ -178,6 +178,39 @@
|
|
178 |
ul.UL-MI_mp3j.mp3j_widgetmods li { font-size:10px !important; line-height:14px !important; }
|
179 |
ul.UL-MI_mp3j.mp3j_widgetmods li a { font-size:10px !important; line-height:14px !important; }
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
/*-------------------------
|
183 |
[mp3j] & [mp3t] SHORTCODES
|
178 |
ul.UL-MI_mp3j.mp3j_widgetmods li { font-size:10px !important; line-height:14px !important; }
|
179 |
ul.UL-MI_mp3j.mp3j_widgetmods li a { font-size:10px !important; line-height:14px !important; }
|
180 |
|
181 |
+
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
.mp3j-nosolution
|
186 |
+
{
|
187 |
+
position:absolute;
|
188 |
+
z-index:9999;
|
189 |
+
height:auto;
|
190 |
+
padding:5%;
|
191 |
+
border:1px solid #c0c0c0;
|
192 |
+
background:#f0f0f0;
|
193 |
+
color:#333;
|
194 |
+
top:4px;
|
195 |
+
left:4px;
|
196 |
+
right:4px;
|
197 |
+
-webkit-border-top-left-radius: 8px;
|
198 |
+
-webkit-border-top-right-radius: 8px;
|
199 |
+
-moz-border-radius-topleft: 8px;
|
200 |
+
-moz-border-radius-topright: 8px;
|
201 |
+
border-top-left-radius: 8px;
|
202 |
+
border-top-right-radius: 8px;
|
203 |
+
font-size:13px;
|
204 |
+
-webkit-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); -moz-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35);
|
205 |
+
}
|
206 |
+
|
207 |
+
.s-nosolution
|
208 |
+
{
|
209 |
+
}
|
210 |
+
|
211 |
+
|
212 |
+
|
213 |
+
|
214 |
|
215 |
/*-------------------------
|
216 |
[mp3j] & [mp3t] SHORTCODES
|
css/players-1-8-text.css
CHANGED
@@ -211,6 +211,35 @@
|
|
211 |
|
212 |
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
/* backwards compat
|
216 |
------------------- */
|
211 |
|
212 |
|
213 |
|
214 |
+
|
215 |
+
.mp3j-nosolution
|
216 |
+
{
|
217 |
+
position:absolute;
|
218 |
+
z-index:9999;
|
219 |
+
height:auto;
|
220 |
+
padding:5%;
|
221 |
+
border:1px solid #c0c0c0;
|
222 |
+
background:#f0f0f0;
|
223 |
+
color:#333;
|
224 |
+
top:4px;
|
225 |
+
left:4px;
|
226 |
+
right:4px;
|
227 |
+
-webkit-border-top-left-radius: 8px;
|
228 |
+
-webkit-border-top-right-radius: 8px;
|
229 |
+
-moz-border-radius-topleft: 8px;
|
230 |
+
-moz-border-radius-topright: 8px;
|
231 |
+
border-top-left-radius: 8px;
|
232 |
+
border-top-right-radius: 8px;
|
233 |
+
font-size:13px;
|
234 |
+
-webkit-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); -moz-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35);
|
235 |
+
}
|
236 |
+
|
237 |
+
.s-nosolution
|
238 |
+
{
|
239 |
+
}
|
240 |
+
|
241 |
+
|
242 |
+
|
243 |
|
244 |
/* backwards compat
|
245 |
------------------- */
|
help.php
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function mp3j_print_help_page() {
|
3 |
+
|
4 |
+
global $mp3_fox;
|
5 |
+
$O = $mp3_fox->getAdminOptions();
|
6 |
+
$colours_array = array();
|
7 |
+
$openTab = '0';
|
8 |
+
?>
|
9 |
+
|
10 |
+
|
11 |
+
<div class="wrap">
|
12 |
+
|
13 |
+
|
14 |
+
<h2> </h2>
|
15 |
+
<h1>Help
|
16 |
+
<span class="description" style="font-size:10px;"> MP3-jPlayer | Version <?php echo $mp3_fox->version_of_plugin; ?></span>
|
17 |
+
<?php
|
18 |
+
if ( $O['disable_jquery_libs'] == "yes" )
|
19 |
+
{
|
20 |
+
echo ' <span style="font-size: 11px; font-weight:700; color:#f66;">(jQuery and UI scripts are turned off)</span>';
|
21 |
+
}
|
22 |
+
?>
|
23 |
+
</h1>
|
24 |
+
<p> </p>
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
<p>Add players using <code>[mp3j]</code> <code>[mp3t]</code> <code>[mp3-jplayer]</code> <code>[mp3-popout]</code> shortcodes, links to mp3s, <a href="widgets.php">widgets</a>, and <a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tags</a>.</p>
|
29 |
+
|
30 |
+
<br />
|
31 |
+
<h3 style="margin-left:0;">Shortcode Parameters</h3>
|
32 |
+
<div class="Ahelp1">
|
33 |
+
|
34 |
+
<h4><code>[mp3-jplayer]</code> <span class="description">Playlist player</span></h4>
|
35 |
+
|
36 |
+
<h5>Parameters:</h5>
|
37 |
+
<p><code>tracks</code> <span class="description">filenames/URIs/FEEDs (<code>,</code> separated)</span><br />
|
38 |
+
<code>captions</code> <span class="description">caption text (<code>;</code> separated)</span><br />
|
39 |
+
<code>vol</code> <span class="description">0 - 100</span><br />
|
40 |
+
<code>autoplay</code> <span class="description">y/n</span><br />
|
41 |
+
<code>loop</code> <span class="description">y/n</span><br />
|
42 |
+
<code>dload</code> <span class="description">y / n / loggedin (show download link)</span><br />
|
43 |
+
<code>list</code> <span class="description">y/n (show playlist)</span><br />
|
44 |
+
<code>pick</code> <span class="description">a number (picks random selection)</span><br />
|
45 |
+
<code>shuffle</code> <span class="description">y/n (shuffle track order)</span><br />
|
46 |
+
<code>title</code> <span class="description">text above player</span><br />
|
47 |
+
<code>pos</code> <span class="description">rel-L, rel-C, rel-R, left, right</span><br />
|
48 |
+
<code>width</code> <span class="description">in px or %</span><br />
|
49 |
+
<code>height</code> <span class="description">in px (player height excluding list)</span><br />
|
50 |
+
<code>pn</code> <span class="description">y/n (show prev/next buttons)</span><br />
|
51 |
+
<code>stop</code> <span class="description">y/n (show stop button)</span><br />
|
52 |
+
<code>id</code> <span class="description">a page id (to read the custom fields from)</span><br />
|
53 |
+
<code>images</code> <span class="description">comma separated list of track image urls</span><br />
|
54 |
+
<!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
|
55 |
+
<code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
|
56 |
+
<code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
|
57 |
+
|
58 |
+
</div>
|
59 |
+
|
60 |
+
<div class="Ahelp1">
|
61 |
+
<h4><code>[mp3j]</code> & <code>[mp3t]</code> <span class="description">Single-track players</span></h4>
|
62 |
+
|
63 |
+
<h5>Parameters:</h5>
|
64 |
+
<p><code>track</code> <span class="description">filename or URI</span><br />
|
65 |
+
<code>caption</code> <span class="description">caption text (right of title)</span><br />
|
66 |
+
<code>vol</code> <span class="description">0 - 100</span><br />
|
67 |
+
<code>volslider</code> <span class="description">y/n</span><br />
|
68 |
+
<code>autoplay</code> <span class="description">y/n</span><br />
|
69 |
+
<code>loop</code> <span class="description">y/n</span><br />
|
70 |
+
<code>title</code> <span class="description">text (replaces both title and caption)</span><br />
|
71 |
+
<code>bold</code> <span class="description">y/n</span><br />
|
72 |
+
<code>flip</code> <span class="description">y/n (play/pause)</span><br />
|
73 |
+
<code>ind</code> <span class="description">y/n (hide indicator and time)</span><br />
|
74 |
+
<code>flow</code> <span class="description">y/n (don't line break)</span><br />
|
75 |
+
<code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
|
76 |
+
|
77 |
+
<h5>Also for <code>[mp3t]</code></h5>
|
78 |
+
<p><code>play</code> play button text<br /><code>stop</code> pause button text</p>
|
79 |
+
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<div class="Ahelp1">
|
83 |
+
<h4><code>[mp3-popout]</code> <span class="description">Link to pop-out player</span></h4>
|
84 |
+
|
85 |
+
<h5>Parameters:</h5>
|
86 |
+
<p><code>tracks</code> <span class="description">files/URIs/FEEDs (<code>,</code> separated)</span><br />
|
87 |
+
<code>captions</code> <span class="description">caption text (<code>;</code> separated)</span><br />
|
88 |
+
<code>vol</code> <span class="description">0 - 100</span><br />
|
89 |
+
<code>autoplay</code> <span class="description">y / n</span><br />
|
90 |
+
<code>loop</code> <span class="description">y / n</span><br />
|
91 |
+
<code>dload</code> <span class="description">y / n / loggedin (show download link)</span><br />
|
92 |
+
<code>list</code> <span class="description">y/n (show popout playlist)</span><br />
|
93 |
+
<code>pick</code> <span class="description">number (pick random selection)</span><br />
|
94 |
+
<code>shuffle</code> <span class="description">y/n (shuffle track order)</span><br />
|
95 |
+
<code>title</code> <span class="description">title for the popout window</span><br />
|
96 |
+
<code>pos</code> <span class="description">rel-L, rel-C, rel-R, left, right (link position)</span><br />
|
97 |
+
<code>text</code> <span class="description">text for the link</span><br />
|
98 |
+
<code>height</code> <span class="description">px (popout player height excluding it's list)</span><br />
|
99 |
+
<code>id</code> <span class="description">a page id (to read the custom fields from)</span><br />
|
100 |
+
<code>tag</code> <span class="description">html tag for text (eg. <code>h2</code>, Default is <code>p</code>)</span><br />
|
101 |
+
<code>image</code> <span class="description">image for the popout link</span><br />
|
102 |
+
<code>images</code> <span class="description">comma separated list of track image urls</span><br />
|
103 |
+
<!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
|
104 |
+
<code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
|
105 |
+
<code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
|
106 |
+
</div>
|
107 |
+
|
108 |
+
<!-- Not in this release
|
109 |
+
<div class="Ahelp1">
|
110 |
+
<h5><code>[mp3-link]</code> Play from a playlist player</h5>
|
111 |
+
<p><code>player</code> number of the player to operate<br /><code>track</code> the track number<br /><code>text</code> link text, defaults to <code>Play</code><br /><code>bold</code> y/n</p>
|
112 |
+
</div>
|
113 |
+
-->
|
114 |
+
|
115 |
+
<br class="clearB" /><br />
|
116 |
+
|
117 |
+
<p><strong>Eg</strong>. <span class="description">Play a url:</span> <code>[mp3j track="http://somedomain.com/myfile.mp3"]</code><br />
|
118 |
+
<strong>Eg</strong>. <span class="description">Play a file from default folder (set below) or library:</span> <code>[mp3j track="myfile.mp3"]</code><br />
|
119 |
+
<strong>Eg</strong>. <span class="description">Make a playlist player:</span> <code>[mp3-jplayer tracks="fileA.mp3, http://somedomain.com/fileB.mp3, fileC.mp3"]</code><br />
|
120 |
+
<strong>Eg</strong>. <span class="description">Add titles:</span> <code>[mp3-jplayer tracks="My Title@fileA.mp3, My Title@fileB.mp3, My Title@fileC.mp3"]</code><br />
|
121 |
+
<strong>Eg</strong>. <span class="description">Add captions:</span> <code>[mp3-jplayer tracks="fileA.mp3, fileB.mp3" captions="Caption A; Caption B"]</code></p>
|
122 |
+
<p><a href="http://sjward.org/jplayer-for-wordpress" target="_blank">More shortcode examples</a></p>
|
123 |
+
<br />
|
124 |
+
|
125 |
+
<p><strong>Use these commands with [mp3-jplayer] in the <code>tracks</code> parameter to playlist entire folders or the library:</strong></p>
|
126 |
+
<p><code>FEED:LIB</code> playlists all mp3s in the library.<br />
|
127 |
+
<code>FEED:DF</code> playlists your default folder.<br />
|
128 |
+
<code>FEED:/my/music</code> playlists a folder or subfolder (relative to root of domain, not the WP install)</p>
|
129 |
+
<p><strong>Eg</strong>. Play 5 random tracks from the library: <code>[mp3-jplayer tracks="FEED:LIB" pick="5"]</code><br />
|
130 |
+
<strong>Eg</strong>. Play everything in the folder called 'tunes': <code>[mp3-jplayer tracks="FEED:/tunes"]</code></p>
|
131 |
+
|
132 |
+
<p>The <code>tracks</code> parameter can contain a mix of FEEDs and filenames/urls, eg. <code>[mp3-jplayer tracks="myfileA.mp3, FEED:/tunes, Title@myfileB.mp3, FEED:DF"]</code>.
|
133 |
+
When just a filename is used the file must be in either your media library or in the default folder (set on this page). You can also specify a file in a sub
|
134 |
+
directory in the default folder eg. <code>tracks="subfolder/file.mp3"</code>.</p>
|
135 |
+
|
136 |
+
<br />
|
137 |
+
|
138 |
+
<h3 style="margin-left:0;">Custom Fields</h3>
|
139 |
+
<p>You can write playlists into the custom fields that are on page and post edit screens (check your 'screen options' at top-right
|
140 |
+
if they're not visible). They can be picked up with any of the shortcodes (from any page/post, or with the template tag, or by the widgets). See below for how
|
141 |
+
to set them up and some example uses:</p>
|
142 |
+
|
143 |
+
<p class="description">1. Enter <code>mp3</code> into the left hand box (the 'key' box).<br />2. Write the filename, URI, or 'FEED' (see above) into the right hand box (the 'value' box) and hit 'add custom field'</p>
|
144 |
+
<p>Add each track or 'FEED' in a new field pair.</p>
|
145 |
+
<p>To add titles and captions in the custom fields use the following format:</p>
|
146 |
+
<p class="description">1. Add a dot, then the caption in the left hand box, eg: <code>mp3.My Caption</code>
|
147 |
+
<br />2. Add the title, then an '@' before the filename in the right box, eg: <code>My Title@filename</code></p>
|
148 |
+
<p>The keys (left boxes) can be numbered, eg:<code>1 mp3</code> will be first on the playlist.</p>
|
149 |
+
|
150 |
+
<p><strong>Eg</strong>. If a custom field key / value pair is set as <code>mp3</code> / <code>FEED:LIB</code>, then the library is available to any shortcodes, so:<br />
|
151 |
+
|
152 |
+
<code>[mp3j]</code> or <code>[mp3t]</code> <span class="description">plays the next track from the library in a single player</span> <br />
|
153 |
+
<code>[mp3j track="3"]</code> or <code>[mp3t track="3"]</code> <span class="description">plays track 3 from the library in a single player</span> <br />
|
154 |
+
<code>[mp3-jplayer]</code> <span class="description">playlists all the custom fields in a playlist player</span><br /></p>
|
155 |
+
|
156 |
+
<br />
|
157 |
+
|
158 |
+
|
159 |
+
<h3 style="margin-left:0;">Widgets</h3>
|
160 |
+
<p class="description">
|
161 |
+
MP3j-sh - <span class="description">Adds players by writing shortcodes.</span><br />
|
162 |
+
MP3j-ui - <span class="description">Adds a playlist player by using tick boxes and modes. Note that some features such as manually written captions, and additional style (css classes) cannot be set with this widget, use the mp3j-sh widget instead.</span>
|
163 |
+
</p>
|
164 |
+
<br />
|
165 |
+
<h3 style="margin-left:0;">Template Tags</h3>
|
166 |
+
<p class="description">For use in theme files, See <a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a> for more details.</p>
|
167 |
+
<p style="line-height:22px;"><code style="font-size:13px;">mp3j_addscripts( $style )</code><br /><code style="font-size:13px;">mp3j_put( $shortcodes )</code><br /><code style="font-size:13px;">mp3j_grab_library( $format )</code><br/><code style="font-size:13px;">mp3j_debug()</code></p>
|
168 |
+
|
169 |
+
<br />
|
170 |
+
|
171 |
+
<h3 style="margin-left:0;">Testing</h3>
|
172 |
+
<p><strong>Make sure you're using default plugin settings for these tests.</strong></p>
|
173 |
+
<p>You can test the plugin with a valid mp3 by copy/pasting the following shortcode into a page or post:<br />
|
174 |
+
<code>[mp3-jplayer tracks="http://sjward.org/seven.mp3"]</code></p>
|
175 |
+
|
176 |
+
<p>To test link replacement copy/paste one of these links, if you're not sure which one then paste them both (one of them should work):</p>
|
177 |
+
<p>If you use the visual (default) editor: <code><a href="http://sjward.org/seven.mp3">Test link</a></code><br />
|
178 |
+
If you use the text editor: <code><a href="http://sjward.org/seven.mp3">Test link</a></code></p>
|
179 |
+
|
180 |
+
<p><br />Links to info:<br /><a href="http://sjward.org/jplayer-for-wordpress">Demo page</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Style Parameter Help</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/remote/help.txt">Forcing Remote Downloads</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a></p>
|
181 |
+
<br /><br />
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
</div>
|
186 |
+
|
187 |
+
|
188 |
+
<?php
|
189 |
+
}
|
190 |
+
?>
|
js/{mp3j-admin-1.8.js → admin-1.8.js}
RENAMED
@@ -2,28 +2,9 @@
|
|
2 |
|
3 |
var MP3J_ADMIN = {
|
4 |
toggle_states: [
|
5 |
-
{ tog_0: false },
|
6 |
-
{ tog_1: false },
|
7 |
{ fox_library: false },
|
8 |
-
{ fox_folder: false }
|
9 |
-
{ fox_op1: false },
|
10 |
-
{ fox_op5: false },
|
11 |
-
{ fox_op2: false },
|
12 |
-
{ fox_op3: false },
|
13 |
-
{ fox_op4: false },
|
14 |
-
{ tog_9: false }
|
15 |
],
|
16 |
-
toggleit: function ( id, label ) {
|
17 |
-
if (this.toggle_states[id]) {
|
18 |
-
jQuery("#" + id + "-list").fadeOut(100);
|
19 |
-
jQuery("#" + id + "-toggle").empty().append(label).blur();
|
20 |
-
this.toggle_states[id] = false;
|
21 |
-
} else {
|
22 |
-
jQuery("#" + id + "-list").fadeIn(200);
|
23 |
-
jQuery("#" + id + "-toggle").empty().append('Hide '+label).blur();
|
24 |
-
this.toggle_states[id] = true;
|
25 |
-
}
|
26 |
-
},
|
27 |
showhideit: function ( id, label ) {
|
28 |
if (this.toggle_states[id]) {
|
29 |
jQuery("#" + id + "-list").fadeOut(100);
|
2 |
|
3 |
var MP3J_ADMIN = {
|
4 |
toggle_states: [
|
|
|
|
|
5 |
{ fox_library: false },
|
6 |
+
{ fox_folder: false }
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
showhideit: function ( id, label ) {
|
9 |
if (this.toggle_states[id]) {
|
10 |
jQuery("#" + id + "-list").fadeOut(100);
|
js/jquery.jplayer.min2-6-0.js
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
!function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery?t.jQuery:t.Zepto)}(this,function(t,e){t.fn.jPlayer=function(s){var i="jPlayer",a="string"==typeof s,n=Array.prototype.slice.call(arguments,1),o=this;return s=!a&&n.length?t.extend.apply(null,[!0,s].concat(n)):s,a&&"_"===s.charAt(0)?o:(this.each(a?function(){var a=t(this).data(i),r=a&&t.isFunction(a[s])?a[s].apply(a,n):a;return r!==a&&r!==e?(o=r,!1):void 0}:function(){var e=t(this).data(i);e?e.option(s||{}):t(this).data(i,new t.jPlayer(s,this))}),o)},t.jPlayer=function(e,s){if(arguments.length){this.element=t(s),this.options=t.extend(!0,{},this.options,e);var i=this;this.element.bind("remove.jPlayer",function(){i.destroy()}),this._init()}},"function"!=typeof t.fn.stop&&(t.fn.stop=function(){}),t.jPlayer.emulateMethods="load play pause",t.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate",t.jPlayer.emulateOptions="muted volume",t.jPlayer.reservedEvent="ready flashreset resize repeat error warning",t.jPlayer.event={},t.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"],function(){t.jPlayer.event[this]="jPlayer_"+this}),t.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","canplay","canplaythrough"],t.jPlayer.pause=function(){t.each(t.jPlayer.prototype.instances,function(t,e){e.data("jPlayer").status.srcSet&&e.jPlayer("pause")})},t.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var s=function(){this.init()};s.prototype={init:function(){this.options={timeFormat:t.jPlayer.timeFormat}},time:function(t){t=t&&"number"==typeof t?t:0;var e=new Date(1e3*t),s=e.getUTCHours(),i=this.options.timeFormat.showHour?e.getUTCMinutes():e.getUTCMinutes()+60*s,a=this.options.timeFormat.showMin?e.getUTCSeconds():e.getUTCSeconds()+60*i,n=this.options.timeFormat.padHour&&10>s?"0"+s:s,o=this.options.timeFormat.padMin&&10>i?"0"+i:i,r=this.options.timeFormat.padSec&&10>a?"0"+a:a,l="";return l+=this.options.timeFormat.showHour?n+this.options.timeFormat.sepHour:"",l+=this.options.timeFormat.showMin?o+this.options.timeFormat.sepMin:"",l+=this.options.timeFormat.showSec?r+this.options.timeFormat.sepSec:""}};var i=new s;t.jPlayer.convertTime=function(t){return i.time(t)},t.jPlayer.uaBrowser=function(t){var e=t.toLowerCase(),s=/(webkit)[ \/]([\w.]+)/,i=/(opera)(?:.*version)?[ \/]([\w.]+)/,a=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,o=s.exec(e)||i.exec(e)||a.exec(e)||e.indexOf("compatible")<0&&n.exec(e)||[];return{browser:o[1]||"",version:o[2]||"0"}},t.jPlayer.uaPlatform=function(t){var e=t.toLowerCase(),s=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/,i=/(ipad|playbook)/,a=/(android)/,n=/(mobile)/,o=s.exec(e)||[],r=i.exec(e)||!n.exec(e)&&a.exec(e)||[];return o[1]&&(o[1]=o[1].replace(/\s/g,"_")),{platform:o[1]||"",tablet:r[1]||""}},t.jPlayer.browser={},t.jPlayer.platform={};var a=t.jPlayer.uaBrowser(navigator.userAgent);a.browser&&(t.jPlayer.browser[a.browser]=!0,t.jPlayer.browser.version=a.version);var n=t.jPlayer.uaPlatform(navigator.userAgent);n.platform&&(t.jPlayer.platform[n.platform]=!0,t.jPlayer.platform.mobile=!n.tablet,t.jPlayer.platform.tablet=!!n.tablet),t.jPlayer.getDocMode=function(){var e;return t.jPlayer.browser.msie&&(document.documentMode?e=document.documentMode:(e=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(e=7))),e},t.jPlayer.browser.documentMode=t.jPlayer.getDocMode(),t.jPlayer.nativeFeatures={init:function(){var t,e,s,i=document,a=i.createElement("video"),n={w3c:["fullscreenEnabled","fullscreenElement","requestFullscreen","exitFullscreen","fullscreenchange","fullscreenerror"],moz:["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror"],webkit:["","webkitCurrentFullScreenElement","webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange",""],webkitVideo:["webkitSupportsFullscreen","webkitDisplayingFullscreen","webkitEnterFullscreen","webkitExitFullscreen","",""]},o=["w3c","moz","webkit","webkitVideo"];for(this.fullscreen=t={support:{w3c:!!i[n.w3c[0]],moz:!!i[n.moz[0]],webkit:"function"==typeof i[n.webkit[3]],webkitVideo:"function"==typeof a[n.webkitVideo[2]]},used:{}},e=0,s=o.length;s>e;e++){var r=o[e];if(t.support[r]){t.spec=r,t.used[r]=!0;break}}if(t.spec){var l=n[t.spec];t.api={fullscreenEnabled:!0,fullscreenElement:function(t){return t=t?t:i,t[l[1]]},requestFullscreen:function(t){return t[l[2]]()},exitFullscreen:function(t){return t=t?t:i,t[l[3]]()}},t.event={fullscreenchange:l[4],fullscreenerror:l[5]}}else t.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},t.event={}}},t.jPlayer.nativeFeatures.init(),t.jPlayer.focus=null,t.jPlayer.keyIgnoreElementNames="A INPUT TEXTAREA SELECT BUTTON";var o=function(e){var s,i=t.jPlayer.focus,a=document.activeElement;i&&("undefined"!=typeof a?null!==a&&"BODY"!==a.nodeName.toUpperCase()&&(s=!0):t.each(t.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(t,i){return e.target.nodeName.toUpperCase()===i.toUpperCase()?(s=!0,!1):void 0}),s||t.each(i.options.keyBindings,function(s,a){return a&&e.which===a.key&&t.isFunction(a.fn)?(e.preventDefault(),a.fn(i),!1):void 0}))};t.jPlayer.keys=function(e){var s="keydown.jPlayer";t(document.documentElement).unbind(s),e&&t(document.documentElement).bind(s,o)},t.jPlayer.keys(!0),t.jPlayer.prototype={count:0,version:{script:"2.7.1",needFlash:"2.7.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:"metadata",volume:.8,muted:!1,remainingDuration:!1,toggleDuration:!1,captureDuration:!0,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:.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",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"},stateClass:{playing:"jp-state-playing",seeking:"jp-state-seeking",muted:"jp-state-muted",looped:"jp-state-looped",fullScreen:"jp-state-full-screen"},useStateClassSkin:!1,autoBlur:!0,smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1e3},loop:!1,repeat:function(e){e.jPlayer.options.loop?t(this).unbind(".jPlayerRepeat").bind(t.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){t(this).jPlayer("play")}):t(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)/,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(t){t.status.paused?t.play():t.pause()}},fullScreen:{key:13,fn:function(t){(t.status.video||t.options.audioFullScreen)&&t._setOption("fullScreen",!t.options.fullScreen)}},muted:{key:8,fn:function(t){t._muted(!t.options.muted)}},volumeUp:{key:38,fn:function(t){t.volume(t.options.volume+.1)}},volumeDown:{key:40,fn:function(t){t.volume(t.options.volume-.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:"",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",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"',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"',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 s=this;if(this.element.empty(),this.status=t.extend({},this.status),this.internal=t.extend({},this.internal),this.options.timeFormat=t.extend({},t.jPlayer.timeFormat,this.options.timeFormat),this.internal.cmdsIgnored=t.jPlayer.platform.ipad||t.jPlayer.platform.iphone||t.jPlayer.platform.ipod,this.internal.domNode=this.element.get(0),this.options.keyEnabled&&!t.jPlayer.focus&&(t.jPlayer.focus=this),this.androidFix={setMedia:!1,play:!1,pause:!1,time:0/0},t.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),t.each(this.options.supplied.toLowerCase().split(","),function(e,i){var a=i.replace(/^\s+|\s+$/g,"");if(s.format[a]){var n=!1;t.each(s.formats,function(t,e){return a===e?(n=!0,!1):void 0}),n||s.formats.push(a)}}),t.each(this.options.solution.toLowerCase().split(","),function(e,i){var a=i.replace(/^\s+|\s+$/g,"");if(s.solution[a]){var n=!1;t.each(s.solutions,function(t,e){return a===e?(n=!0,!1):void 0}),n||s.solutions.push(a)}}),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=t.extend({},{id:this.element.attr("id"),jq:this.element}),this.internal.audio=t.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:e}),this.internal.video=t.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:e}),this.internal.flash=t.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:e,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"Jplayer.swf":"")}),this.internal.poster=t.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:e}),t.each(t.jPlayer.event,function(t,i){s.options[t]!==e&&(s.element.bind(i+".jPlayer",s.options[t]),s.options[t]=e)}),this.require.audio=!1,this.require.video=!1,t.each(this.formats,function(t,e){s.require[s.format[e].media]=!0}),this.options=this.require.video?t.extend(!0,{},this.optionsVideo,this.options):t.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),t.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(){(!s.status.video||s.status.waitForPlay)&&s.internal.poster.jq.show()},this.element.append(this.htmlElement.poster),this.internal.poster.jq=t("#"+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(){s._trigger(t.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)),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={},t.each(this.formats,function(t,e){s.html.canPlay[e]=s.html[s.format[e].media].available&&""!==s.htmlElement[s.format[e].media].canPlayType(s.format[e].codec),s.flash.canPlay[e]=s.format[e].flashCanPlay&&s.flash.available}),this.html.desired=!1,this.flash.desired=!1,t.each(this.solutions,function(e,i){if(0===e)s[i].desired=!0;else{var a=!1,n=!1;t.each(s.formats,function(t,e){s[s.solutions[0]].canPlay[e]&&("video"===s.format[e].media?n=!0:a=!0)}),s[i].desired=s.require.audio&&!a||s.require.video&&!n}}),this.html.support={},this.flash.support={},t.each(this.formats,function(t,e){s.html.support[e]=s.html.canPlay[e]&&s.html.desired,s.flash.support[e]=s.flash.canPlay[e]&&s.flash.desired}),this.html.used=!1,this.flash.used=!1,t.each(this.solutions,function(e,i){t.each(s.formats,function(t,e){return s[i].support[e]?(s[i].used=!0,!1):void 0})}),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:t.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:t.jPlayer.errorMsg.NO_SOLUTION,hint:t.jPlayer.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show()),this.flash.used){var i,a="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(t.jPlayer.browser.msie&&(Number(t.jPlayer.browser.version)<9||t.jPlayer.browser.documentMode<9)){var n='<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0" tabindex="-1"></object>',o=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+a+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];i=document.createElement(n);for(var r=0;r<o.length;r++)i.appendChild(document.createElement(o[r]))}else{var l=function(t,e,s){var i=document.createElement("param");i.setAttribute("name",e),i.setAttribute("value",s),t.appendChild(i)};i=document.createElement("object"),i.setAttribute("id",this.internal.flash.id),i.setAttribute("name",this.internal.flash.id),i.setAttribute("data",this.internal.flash.swf),i.setAttribute("type","application/x-shockwave-flash"),i.setAttribute("width","1"),i.setAttribute("height","1"),i.setAttribute("tabindex","-1"),l(i,"flashvars",a),l(i,"allowscriptaccess","always"),l(i,"bgcolor",this.options.backgroundColor),l(i,"wmode",this.options.wmode)}this.element.append(i),this.internal.flash.jq=t(i)}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=t("#"+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=t("#"+this.internal.video.id),this.internal.video.jq.css(this.status.nativeVideoControls?{width:this.status.width,height:this.status.height}:{width:"0px",height:"0px"}),this.internal.video.jq.bind("click.jPlayer",function(){s._trigger(t.jPlayer.event.click)}))),this.options.emulateHtml&&this._emulateHtmlBridge(),this.html.used&&!this.flash.used&&setTimeout(function(){s.internal.ready=!0,s.version.flash="n/a",s._trigger(t.jPlayer.event.repeat),s._trigger(t.jPlayer.event.ready)},100),this._updateNativeVideoControls(),this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),t.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(""),t.each(this.css.jq,function(t,e){e.length&&e.unbind(".jPlayer")}),this.internal.poster.jq.unbind(".jPlayer"),this.internal.video.jq&&this.internal.video.jq.unbind(".jPlayer"),this._fullscreenRemoveEventListeners(),this===t.jPlayer.focus&&(t.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(t){try{return t.canPlayType(this.format.mp3.codec),!0}catch(e){return!1}},_testPlaybackRate:function(t){var e,s=.5;t="string"==typeof t?t:"audio",e=document.createElement(t);try{return"playbackRate"in e?(e.playbackRate=s,e.playbackRate===s):!1}catch(i){return!1}},_uaBlocklist:function(e){var s=navigator.userAgent.toLowerCase(),i=!1;return t.each(e,function(t,e){return e&&e.test(s)?(i=!0,!1):void 0}),i},_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?(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(e,s){var i=this;e.preload=this.options.preload,e.muted=this.options.muted,e.volume=this.options.volume,this.status.playbackRateEnabled&&(e.defaultPlaybackRate=this.options.defaultPlaybackRate,e.playbackRate=this.options.playbackRate),e.addEventListener("progress",function(){s.gate&&(i.internal.cmdsIgnored&&this.readyState>0&&(i.internal.cmdsIgnored=!1),i._getHtmlStatus(e),i._updateInterface(),i._trigger(t.jPlayer.event.progress))},!1),e.addEventListener("loadeddata",function(){s.gate&&(i.androidFix.setMedia=!1,i.androidFix.play&&(i.androidFix.play=!1,i.play(i.androidFix.time)),i.androidFix.pause&&(i.androidFix.pause=!1,i.pause(i.androidFix.time)),i._trigger(t.jPlayer.event.loadeddata))},!1),e.addEventListener("timeupdate",function(){s.gate&&(i._getHtmlStatus(e),i._updateInterface(),i._trigger(t.jPlayer.event.timeupdate))},!1),e.addEventListener("durationchange",function(){s.gate&&(i._getHtmlStatus(e),i._updateInterface(),i._trigger(t.jPlayer.event.durationchange))},!1),e.addEventListener("play",function(){s.gate&&(i._updateButtons(!0),i._html_checkWaitForPlay(),i._trigger(t.jPlayer.event.play))},!1),e.addEventListener("playing",function(){s.gate&&(i._updateButtons(!0),i._seeked(),i._trigger(t.jPlayer.event.playing))},!1),e.addEventListener("pause",function(){s.gate&&(i._updateButtons(!1),i._trigger(t.jPlayer.event.pause))},!1),e.addEventListener("waiting",function(){s.gate&&(i._seeking(),i._trigger(t.jPlayer.event.waiting))},!1),e.addEventListener("seeking",function(){s.gate&&(i._seeking(),i._trigger(t.jPlayer.event.seeking))},!1),e.addEventListener("seeked",function(){s.gate&&(i._seeked(),i._trigger(t.jPlayer.event.seeked))},!1),e.addEventListener("volumechange",function(){s.gate&&(i.options.volume=e.volume,i.options.muted=e.muted,i._updateMute(),i._updateVolume(),i._trigger(t.jPlayer.event.volumechange))},!1),e.addEventListener("ratechange",function(){s.gate&&(i.options.defaultPlaybackRate=e.defaultPlaybackRate,i.options.playbackRate=e.playbackRate,i._updatePlaybackRate(),i._trigger(t.jPlayer.event.ratechange))},!1),e.addEventListener("suspend",function(){s.gate&&(i._seeked(),i._trigger(t.jPlayer.event.suspend))},!1),e.addEventListener("ended",function(){s.gate&&(t.jPlayer.browser.webkit||(i.htmlElement.media.currentTime=0),i.htmlElement.media.pause(),i._updateButtons(!1),i._getHtmlStatus(e,!0),i._updateInterface(),i._trigger(t.jPlayer.event.ended))},!1),e.addEventListener("error",function(){s.gate&&(i._updateButtons(!1),i._seeked(),i.status.srcSet&&(clearTimeout(i.internal.htmlDlyCmdId),i.status.waitForLoad=!0,i.status.waitForPlay=!0,i.status.video&&!i.status.nativeVideoControls&&i.internal.video.jq.css({width:"0px",height:"0px"}),i._validString(i.status.media.poster)&&!i.status.nativeVideoControls&&i.internal.poster.jq.show(),i.css.jq.videoPlay.length&&i.css.jq.videoPlay.show(),i._error({type:t.jPlayer.error.URL,context:i.status.src,message:t.jPlayer.errorMsg.URL,hint:t.jPlayer.errorHint.URL})))},!1),t.each(t.jPlayer.htmlEvent,function(a,n){e.addEventListener(this,function(){s.gate&&i._trigger(t.jPlayer.event[n])},!1)})},_getHtmlStatus:function(t,e){var s=0,i=0,a=0,n=0;isFinite(t.duration)&&(this.status.duration=t.duration),s=t.currentTime,i=this.status.duration>0?100*s/this.status.duration:0,"object"==typeof t.seekable&&t.seekable.length>0?(a=this.status.duration>0?100*t.seekable.end(t.seekable.length-1)/this.status.duration:100,n=this.status.duration>0?100*t.currentTime/t.seekable.end(t.seekable.length-1):0):(a=100,n=i),e&&(s=0,n=0,i=0),this.status.seekPercent=a,this.status.currentPercentRelative=n,this.status.currentPercentAbsolute=i,this.status.currentTime=s,this.status.remaining=this.status.duration-this.status.currentTime,this.status.videoWidth=t.videoWidth,this.status.videoHeight=t.videoHeight,this.status.readyState=t.readyState,this.status.networkState=t.networkState,this.status.playbackRate=t.playbackRate,this.status.ended=t.ended},_resetStatus:function(){this.status=t.extend({},this.status,t.jPlayer.prototype.status)},_trigger:function(e,s,i){var a=t.Event(e);a.jPlayer={},a.jPlayer.version=t.extend({},this.version),a.jPlayer.options=t.extend(!0,{},this.options),a.jPlayer.status=t.extend(!0,{},this.status),a.jPlayer.html=t.extend(!0,{},this.html),a.jPlayer.flash=t.extend(!0,{},this.flash),s&&(a.jPlayer.error=t.extend({},s)),i&&(a.jPlayer.warning=t.extend({},i)),this.element.trigger(a)},jPlayerFlashEvent:function(e,s){if(e===t.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var i=this.status.currentTime,a=this.status.paused;this.setMedia(this.status.media),this.volumeWorker(this.options.volume),i>0&&(a?this.pause(i):this.play(i))}this._trigger(t.jPlayer.event.flashreset)}}else this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=s.version,this.version.needFlash!==this.version.flash&&this._error({type:t.jPlayer.error.VERSION,context:this.version.flash,message:t.jPlayer.errorMsg.VERSION+this.version.flash,hint:t.jPlayer.errorHint.VERSION}),this._trigger(t.jPlayer.event.repeat),this._trigger(e);if(this.flash.gate)switch(e){case t.jPlayer.event.progress:this._getFlashStatus(s),this._updateInterface(),this._trigger(e);break;case t.jPlayer.event.timeupdate:this._getFlashStatus(s),this._updateInterface(),this._trigger(e);break;case t.jPlayer.event.play:this._seeked(),this._updateButtons(!0),this._trigger(e);break;case t.jPlayer.event.pause:this._updateButtons(!1),this._trigger(e);break;case t.jPlayer.event.ended:this._updateButtons(!1),this._trigger(e);break;case t.jPlayer.event.click:this._trigger(e);break;case t.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),this._error({type:t.jPlayer.error.URL,context:s.src,message:t.jPlayer.errorMsg.URL,hint:t.jPlayer.errorHint.URL});break;case t.jPlayer.event.seeking:this._seeking(),this._trigger(e);break;case t.jPlayer.event.seeked:this._seeked(),this._trigger(e);break;case t.jPlayer.event.ready:break;default:this._trigger(e)}return!1},_getFlashStatus:function(t){this.status.seekPercent=t.seekPercent,this.status.currentPercentRelative=t.currentPercentRelative,this.status.currentPercentAbsolute=t.currentPercentAbsolute,this.status.currentTime=t.currentTime,this.status.duration=t.duration,this.status.remaining=t.duration-t.currentTime,this.status.videoWidth=t.videoWidth,this.status.videoHeight=t.videoHeight,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_updateButtons:function(t){t===e?t=!this.status.paused:this.status.paused=!t,t?this.addStateClass("playing"):this.removeStateClass("playing"),!this.status.noFullWindow&&this.options.fullWindow?this.addStateClass("fullScreen"):this.removeStateClass("fullScreen"),this.options.loop?this.addStateClass("looped"):this.removeStateClass("looped"),this.css.jq.play.length&&this.css.jq.pause.length&&(t?(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(),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+"%"},250,"linear"):this.css.jq.playBar.width(this.status.currentPercentRelative+"%"));var t="";this.css.jq.currentTime.length&&(t=this._convertTime(this.status.currentTime),t!==this.css.jq.currentTime.text()&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)));var e="",s=this.status.duration,i=this.status.remaining;this.css.jq.duration.length&&("string"==typeof this.status.media.duration?e=this.status.media.duration:("number"==typeof this.status.media.duration&&(s=this.status.media.duration,i=s-this.status.currentTime),e=this.options.remainingDuration?(i>0?"-":"")+this._convertTime(i):this._convertTime(s)),e!==this.css.jq.duration.text()&&this.css.jq.duration.text(e))},_convertTime:s.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg"),this.addStateClass("seeking")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg"),this.removeStateClass("seeking")},_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(t){return t.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")},_qualifyURL:function(t){var e=document.createElement("div");return e.innerHTML='<a href="'+this._escapeHtml(t)+'">x</a>',e.firstChild.href},_absoluteMediaUrls:function(e){var s=this;return t.each(e,function(t,i){i&&s.format[t]&&(e[t]=s._qualifyURL(i))}),e},addStateClass:function(t){this.ancestorJq.length&&this.ancestorJq.addClass(this.options.stateClass[t])},removeStateClass:function(t){this.ancestorJq.length&&this.ancestorJq.removeClass(this.options.stateClass[t])},setMedia:function(e){var s=this,i=!1,a=this.status.media.poster!==e.poster;this._resetMedia(),this._resetGate(),this._resetActive(),this.androidFix.setMedia=!1,this.androidFix.play=!1,this.androidFix.pause=!1,e=this._absoluteMediaUrls(e),t.each(this.formats,function(a,n){var o="video"===s.format[n].media;return t.each(s.solutions,function(a,r){if(s[r].support[n]&&s._validString(e[n])){var l="html"===r;return o?(l?(s.html.video.gate=!0,s._html_setVideo(e),s.html.active=!0):(s.flash.gate=!0,s._flash_setVideo(e),s.flash.active=!0),s.css.jq.videoPlay.length&&s.css.jq.videoPlay.show(),s.status.video=!0):(l?(s.html.audio.gate=!0,s._html_setAudio(e),s.html.active=!0,t.jPlayer.platform.android&&(s.androidFix.setMedia=!0)):(s.flash.gate=!0,s._flash_setAudio(e),s.flash.active=!0),s.css.jq.videoPlay.length&&s.css.jq.videoPlay.hide(),s.status.video=!1),i=!0,!1}}),i?!1:void 0}),i?(this.status.nativeVideoControls&&this.html.video.gate||this._validString(e.poster)&&(a?this.htmlElement.poster.src=e.poster:this.internal.poster.jq.show()),this.css.jq.title.length&&"string"==typeof e.title&&(this.css.jq.title.html(e.title),this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",e.title),this.htmlElement.video&&this.htmlElement.video.setAttribute("title",e.title)),this.status.srcSet=!0,this.status.media=t.extend({},e),this._updateButtons(!1),this._updateInterface(),this._trigger(t.jPlayer.event.setmedia)):this._error({type:t.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:t.jPlayer.errorMsg.NO_SUPPORT,hint:t.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():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&&(t.jPlayer.focus=this)},play:function(t){var e="object"==typeof t;e&&this.options.useStateClassSkin&&!this.status.paused?this.pause(t):(t="number"==typeof t?t:0/0,this.status.srcSet?(this.focus(),this.html.active?this._html_play(t):this.flash.active&&this._flash_play(t)):this._urlNotSetError("play"))},videoPlay:function(){this.play()
|
2 |
-
|
3 |
-
},pause:function(t){t="number"==typeof t?t:0/0,this.status.srcSet?this.html.active?this._html_pause(t):this.flash.active&&this._flash_pause(t):this._urlNotSetError("pause")},tellOthers:function(e,s){var i=this,a="function"==typeof s,n=Array.prototype.slice.call(arguments);"string"==typeof e&&(a&&n.splice(1,1),t.each(this.instances,function(){i.element!==this&&(!a||s.call(this.data("jPlayer"),i))&&this.jPlayer.apply(this,n)}))},pauseOthers:function(t){this.tellOthers("pause",function(){return this.status.srcSet},t)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(t){t=this._limitValue(t,0,100),this.status.srcSet?this.html.active?this._html_playHead(t):this.flash.active&&this._flash_playHead(t):this._urlNotSetError("playHead")},_muted:function(t){this.mutedWorker(t),this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},t)},mutedWorker:function(e){this.options.muted=e,this.html.used&&this._html_setProperty("muted",e),this.flash.used&&this._flash_mute(e),this.html.video.gate||this.html.audio.gate||(this._updateMute(e),this._updateVolume(this.options.volume),this._trigger(t.jPlayer.event.volumechange))},mute:function(t){var s="object"==typeof t;s&&this.options.useStateClassSkin&&this.options.muted?this._muted(!1):(t=t===e?!0:!!t,this._muted(t))},unmute:function(t){t=t===e?!0:!!t,this._muted(!t)},_updateMute:function(t){t===e&&(t=this.options.muted),t?this.addStateClass("muted"):this.removeStateClass("muted"),this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):t?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(t){this.volumeWorker(t),this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},t)},volumeWorker:function(e){e=this._limitValue(e,0,1),this.options.volume=e,this.html.used&&this._html_setProperty("volume",e),this.flash.used&&this._flash_volume(e),this.html.video.gate||this.html.audio.gate||(this._updateVolume(e),this._trigger(t.jPlayer.event.volumechange))},volumeBar:function(e){if(this.css.jq.volumeBar.length){var s=t(e.currentTarget),i=s.offset(),a=e.pageX-i.left,n=s.width(),o=s.height()-e.pageY+i.top,r=s.height();this.volume(this.options.verticalVolume?o/r:a/n)}this.options.muted&&this._muted(!1)},_updateVolume:function(t){t===e&&(t=this.options.volume),t=this.options.muted?0:t,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&&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*t+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1),this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(e){var s=this;this.options.cssSelectorAncestor=e,this._removeUiClass(),this.ancestorJq=e?t(e):[],e&&1!==this.ancestorJq.length&&this._warning({type:t.jPlayer.warning.CSS_SELECTOR_COUNT,context:e,message:t.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:t.jPlayer.warningHint.CSS_SELECTOR_COUNT}),this._addUiClass(),t.each(this.options.cssSelector,function(t,e){s._cssSelector(t,e)}),this._updateInterface(),this._updateButtons(),this._updateAutohide(),this._updateVolume(),this._updateMute()},_cssSelector:function(e,s){var i=this;if("string"==typeof s)if(t.jPlayer.prototype.options.cssSelector[e]){if(this.css.jq[e]&&this.css.jq[e].length&&this.css.jq[e].unbind(".jPlayer"),this.options.cssSelector[e]=s,this.css.cs[e]=this.options.cssSelectorAncestor+" "+s,this.css.jq[e]=s?t(this.css.cs[e]):[],this.css.jq[e].length&&this[e]){var a=function(s){s.preventDefault(),i[e](s),i.options.autoBlur&&t(this).blur()};this.css.jq[e].bind("click.jPlayer",a)}s&&1!==this.css.jq[e].length&&this._warning({type:t.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[e],message:t.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[e].length+" found for "+e+" method.",hint:t.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:t.jPlayer.warning.CSS_SELECTOR_METHOD,context:e,message:t.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:t.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:t.jPlayer.warning.CSS_SELECTOR_STRING,context:s,message:t.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:t.jPlayer.warningHint.CSS_SELECTOR_STRING})},duration:function(t){this.options.toggleDuration&&(this.options.captureDuration&&t.stopPropagation(),this._setOption("remainingDuration",!this.options.remainingDuration))},seekBar:function(e){if(this.css.jq.seekBar.length){var s=t(e.currentTarget),i=s.offset(),a=e.pageX-i.left,n=s.width(),o=100*a/n;this.playHead(o)}},playbackRate:function(t){this._setOption("playbackRate",t)},playbackRateBar:function(e){if(this.css.jq.playbackRateBar.length){var s,i,a=t(e.currentTarget),n=a.offset(),o=e.pageX-n.left,r=a.width(),l=a.height()-e.pageY+n.top,h=a.height();s=this.options.verticalPlaybackRate?l/h:o/r,i=s*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate,this.playbackRate(i)}},_updatePlaybackRate:function(){var t=this.options.playbackRate,e=(t-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*e+"%"))):(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(t){var e="object"==typeof t;this._loop(e&&this.options.useStateClassSkin&&this.options.loop?!1:!0)},repeatOff:function(){this._loop(!1)},_loop:function(e){this.options.loop!==e&&(this.options.loop=e,this._updateButtons(),this._trigger(t.jPlayer.event.repeat))},option:function(s,i){var a=s;if(0===arguments.length)return t.extend(!0,{},this.options);if("string"==typeof s){var n=s.split(".");if(i===e){for(var o=t.extend(!0,{},this.options),r=0;r<n.length;r++){if(o[n[r]]===e)return this._warning({type:t.jPlayer.warning.OPTION_KEY,context:s,message:t.jPlayer.warningMsg.OPTION_KEY,hint:t.jPlayer.warningHint.OPTION_KEY}),e;o=o[n[r]]}return o}a={};for(var l=a,h=0;h<n.length;h++)h<n.length-1?(l[n[h]]={},l=l[n[h]]):l[n[h]]=i}return this._setOptions(a),this},_setOptions:function(e){var s=this;return t.each(e,function(t,e){s._setOption(t,e)}),this},_setOption:function(e,s){var i=this;switch(e){case"volume":this.volume(s);break;case"muted":this._muted(s);break;case"globalVolume":this.options[e]=s;break;case"cssSelectorAncestor":this._cssSelectorAncestor(s);break;case"cssSelector":t.each(s,function(t,e){i._cssSelector(t,e)});break;case"playbackRate":this.options[e]=s=this._limitValue(s,this.options.minPlaybackRate,this.options.maxPlaybackRate),this.html.used&&this._html_setProperty("playbackRate",s),this._updatePlaybackRate();break;case"defaultPlaybackRate":this.options[e]=s=this._limitValue(s,this.options.minPlaybackRate,this.options.maxPlaybackRate),this.html.used&&this._html_setProperty("defaultPlaybackRate",s),this._updatePlaybackRate();break;case"minPlaybackRate":this.options[e]=s=this._limitValue(s,.1,this.options.maxPlaybackRate-.1),this._updatePlaybackRate();break;case"maxPlaybackRate":this.options[e]=s=this._limitValue(s,this.options.minPlaybackRate+.1,16),this._updatePlaybackRate();break;case"fullScreen":if(this.options[e]!==s){var a=t.jPlayer.nativeFeatures.fullscreen.used.webkitVideo;(!a||a&&!this.status.waitForPlay)&&(a||(this.options[e]=s),s?this._requestFullscreen():this._exitFullscreen(),a||this._setOption("fullWindow",s))}break;case"fullWindow":this.options[e]!==s&&(this._removeUiClass(),this.options[e]=s,this._refreshSize());break;case"size":this.options.fullWindow||this.options[e].cssClass===s.cssClass||this._removeUiClass(),this.options[e]=t.extend({},this.options[e],s),this._refreshSize();break;case"sizeFull":this.options.fullWindow&&this.options[e].cssClass!==s.cssClass&&this._removeUiClass(),this.options[e]=t.extend({},this.options[e],s),this._refreshSize();break;case"autohide":this.options[e]=t.extend({},this.options[e],s),this._updateAutohide();break;case"loop":this._loop(s);break;case"remainingDuration":this.options[e]=s,this._updateInterface();break;case"toggleDuration":this.options[e]=s;break;case"nativeVideoControls":this.options[e]=t.extend({},this.options[e],s),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this._restrictNativeVideoControls(),this._updateNativeVideoControls();break;case"noFullWindow":this.options[e]=t.extend({},this.options[e],s),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[e]=t.extend({},this.options[e],s),this.status.noVolume=this._uaBlocklist(this.options.noVolume),this._updateVolume(),this._updateMute();break;case"emulateHtml":this.options[e]!==s&&(this.options[e]=s,s?this._emulateHtmlBridge():this._destroyHtmlBridge());break;case"timeFormat":this.options[e]=t.extend({},this.options[e],s);break;case"keyEnabled":this.options[e]=s,s||this!==t.jPlayer.focus||(t.jPlayer.focus=null);break;case"keyBindings":this.options[e]=t.extend(!0,{},this.options[e],s);break;case"audioFullScreen":this.options[e]=s;break;case"autoBlur":this.options[e]=s}return this},_refreshSize:function(){this._setSize(),this._addUiClass(),this._updateSize(),this._updateButtons(),this._updateAutohide(),this._trigger(t.jPlayer.event.resize)},_setSize:function(){this.options.fullWindow?(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)},_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 t=this,e="mousemove.jPlayer",s=".jPlayerAutohide",i=e+s,a=function(){t.css.jq.gui.fadeIn(t.options.autohide.fadeIn,function(){clearTimeout(t.internal.autohideId),t.internal.autohideId=setTimeout(function(){t.css.jq.gui.fadeOut(t.options.autohide.fadeOut)},t.options.autohide.hold)})};this.css.jq.gui.length&&(this.css.jq.gui.stop(!0,!0),clearTimeout(this.internal.autohideId),this.element.unbind(s),this.css.jq.gui.unbind(s),this.status.nativeVideoControls?this.css.jq.gui.hide():this.options.fullWindow&&this.options.autohide.full||!this.options.fullWindow&&this.options.autohide.restored?(this.element.bind(i,a),this.css.jq.gui.bind(i,a),this.css.jq.gui.hide()):this.css.jq.gui.show())},fullScreen:function(t){var e="object"==typeof t;e&&this.options.useStateClassSkin&&this.options.fullScreen?this._setOption("fullScreen",!1):this._setOption("fullScreen",!0)},restoreScreen:function(){this._setOption("fullScreen",!1)},_fullscreenAddEventListeners:function(){var e=this,s=t.jPlayer.nativeFeatures.fullscreen;s.api.fullscreenEnabled&&s.event.fullscreenchange&&("function"!=typeof this.internal.fullscreenchangeHandler&&(this.internal.fullscreenchangeHandler=function(){e._fullscreenchange()}),document.addEventListener(s.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1))},_fullscreenRemoveEventListeners:function(){var e=t.jPlayer.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.removeEventListener(e.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1)},_fullscreenchange:function(){this.options.fullScreen&&!t.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()&&this._setOption("fullScreen",!1)},_requestFullscreen:function(){var e=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],s=t.jPlayer.nativeFeatures.fullscreen;s.used.webkitVideo&&(e=this.htmlElement.video),s.api.fullscreenEnabled&&s.api.requestFullscreen(e)},_exitFullscreen:function(){var e,s=t.jPlayer.nativeFeatures.fullscreen;s.used.webkitVideo&&(e=this.htmlElement.video),s.api.fullscreenEnabled&&s.api.exitFullscreen(e)},_html_initMedia:function(e){var s=t(this.htmlElement.media).empty();t.each(e.track||[],function(t,e){var i=document.createElement("track");i.setAttribute("kind",e.kind?e.kind:""),i.setAttribute("src",e.src?e.src:""),i.setAttribute("srclang",e.srclang?e.srclang:""),i.setAttribute("label",e.label?e.label:""),e.def&&i.setAttribute("default",e.def),s.append(i)}),this.htmlElement.media.src=this.status.src,"none"!==this.options.preload&&this._html_load(),this._trigger(t.jPlayer.event.timeupdate)},_html_setFormat:function(e){var s=this;t.each(this.formats,function(t,i){return s.html.support[i]&&e[i]?(s.status.src=e[i],s.status.format[i]=!0,s.status.formatType=i,!1):void 0})},_html_setAudio:function(t){this._html_setFormat(t),this.htmlElement.media=this.htmlElement.audio,this._html_initMedia(t)},_html_setVideo:function(t){this._html_setFormat(t),this.status.nativeVideoControls&&(this.htmlElement.video.poster=this._validString(t.poster)?t.poster:""),this.htmlElement.media=this.htmlElement.video,this._html_initMedia(t)},_html_resetMedia:function(){this.htmlElement.media&&(this.htmlElement.media.id!==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(t){var e=this,s=this.htmlElement.media;if(this.androidFix.pause=!1,this._html_load(),this.androidFix.setMedia)this.androidFix.play=!0,this.androidFix.time=t;else if(isNaN(t))s.play();else{this.internal.cmdsIgnored&&s.play();try{if(s.seekable&&!("object"==typeof s.seekable&&s.seekable.length>0))throw 1;s.currentTime=t,s.play()}catch(i){return void(this.internal.htmlDlyCmdId=setTimeout(function(){e.play(t)},250))}}this._html_checkWaitForPlay()},_html_pause:function(t){var e=this,s=this.htmlElement.media;if(this.androidFix.play=!1,t>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId),s.pause(),this.androidFix.setMedia)this.androidFix.pause=!0,this.androidFix.time=t;else if(!isNaN(t))try{if(s.seekable&&!("object"==typeof s.seekable&&s.seekable.length>0))throw 1;s.currentTime=t}catch(i){return void(this.internal.htmlDlyCmdId=setTimeout(function(){e.pause(t)},250))}t>0&&this._html_checkWaitForPlay()},_html_playHead:function(t){var e=this,s=this.htmlElement.media;this._html_load();try{if("object"==typeof s.seekable&&s.seekable.length>0)s.currentTime=t*s.seekable.end(s.seekable.length-1)/100;else{if(!(s.duration>0)||isNaN(s.duration))throw"e";s.currentTime=t*s.duration/100}}catch(i){return void(this.internal.htmlDlyCmdId=setTimeout(function(){e.playHead(t)},250))}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})))},_html_setProperty:function(t,e){this.html.audio.available&&(this.htmlElement.audio[t]=e),this.html.video.available&&(this.htmlElement.video[t]=e)},_flash_setAudio:function(e){var s=this;try{t.each(this.formats,function(t,i){if(s.flash.support[i]&&e[i]){switch(i){case"m4a":case"fla":s._getMovie().fl_setAudio_m4a(e[i]);break;case"mp3":s._getMovie().fl_setAudio_mp3(e[i]);break;case"rtmpa":s._getMovie().fl_setAudio_rtmp(e[i])}return s.status.src=e[i],s.status.format[i]=!0,s.status.formatType=i,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(i){this._flashError(i)}},_flash_setVideo:function(e){var s=this;try{t.each(this.formats,function(t,i){if(s.flash.support[i]&&e[i]){switch(i){case"m4v":case"flv":s._getMovie().fl_setVideo_m4v(e[i]);break;case"rtmpv":s._getMovie().fl_setVideo_rtmp(e[i])}return s.status.src=e[i],s.status.format[i]=!0,s.status.formatType=i,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(i){this._flashError(i)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"}),this._flash_pause(0/0)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(t){this._flashError(t)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(t){this._flashError(t)}this.status.waitForLoad=!1},_flash_play:function(t){try{this._getMovie().fl_play(t)}catch(e){this._flashError(e)}this.status.waitForLoad=!1,this._flash_checkWaitForPlay()},_flash_pause:function(t){try{this._getMovie().fl_pause(t)}catch(e){this._flashError(e)}t>0&&(this.status.waitForLoad=!1,this._flash_checkWaitForPlay())},_flash_playHead:function(t){try{this._getMovie().fl_play_head(t)}catch(e){this._flashError(e)}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(t){try{this._getMovie().fl_volume(t)}catch(e){this._flashError(e)}},_flash_mute:function(t){try{this._getMovie().fl_mute(t)}catch(e){this._flashError(e)}},_getMovie:function(){return document[this.internal.flash.id]},_getFlashPluginVersion:function(){var t,e=0;if(window.ActiveXObject)try{if(t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var s=t.GetVariable("$version");s&&(s=s.split(" ")[1].split(","),e=parseInt(s[0],10)+"."+parseInt(s[1],10))}}catch(i){}else navigator.plugins&&navigator.mimeTypes.length>0&&(t=navigator.plugins["Shockwave Flash"],t&&(e=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")));return 1*e},_checkForFlash:function(t){var e=!1;return this._getFlashPluginVersion()>=t&&(e=!0),e},_validString:function(t){return t&&"string"==typeof t},_limitValue:function(t,e,s){return e>t?e:t>s?s:t},_urlNotSetError:function(e){this._error({type:t.jPlayer.error.URL_NOT_SET,context:e,message:t.jPlayer.errorMsg.URL_NOT_SET,hint:t.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(e){var s;s=this.internal.ready?"FLASH_DISABLED":"FLASH",this._error({type:t.jPlayer.error[s],context:this.internal.flash.swf,message:t.jPlayer.errorMsg[s]+e.message,hint:t.jPlayer.errorHint[s]}),this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(e){this._trigger(t.jPlayer.event.error,e),this.options.errorAlerts&&this._alert("Error!"+(e.message?"\n"+e.message:"")+(e.hint?"\n"+e.hint:"")+"\nContext: "+e.context)},_warning:function(s){this._trigger(t.jPlayer.event.warning,e,s),this.options.warningAlerts&&this._alert("Warning!"+(s.message?"\n"+s.message:"")+(s.hint?"\n"+s.hint:"")+"\nContext: "+s.context)},_alert:function(t){var e="jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+t;this.options.consoleAlerts?window.console&&window.console.log&&window.console.log(e):alert(e)},_emulateHtmlBridge:function(){var e=this;t.each(t.jPlayer.emulateMethods.split(/\s+/g),function(t,s){e.internal.domNode[s]=function(t){e[s](t)}}),t.each(t.jPlayer.event,function(s,i){var a=!0;t.each(t.jPlayer.reservedEvent.split(/\s+/g),function(t,e){return e===s?(a=!1,!1):void 0}),a&&e.element.bind(i+".jPlayer.jPlayerHtml",function(){e._emulateHtmlUpdate();var t=document.createEvent("Event");t.initEvent(s,!1,!0),e.internal.domNode.dispatchEvent(t)})})},_emulateHtmlUpdate:function(){var e=this;t.each(t.jPlayer.emulateStatus.split(/\s+/g),function(t,s){e.internal.domNode[s]=e.status[s]}),t.each(t.jPlayer.emulateOptions.split(/\s+/g),function(t,s){e.internal.domNode[s]=e.options[s]})},_destroyHtmlBridge:function(){var e=this;this.element.unbind(".jPlayerHtml");var s=t.jPlayer.emulateMethods+" "+t.jPlayer.emulateStatus+" "+t.jPlayer.emulateOptions;t.each(s.split(/\s+/g),function(t,s){delete e.internal.domNode[s]})}},t.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"},t.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.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+t.jPlayer.prototype.version.script+" needs Jplayer.swf version "+t.jPlayer.prototype.version.needFlash+" but found "},t.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.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."},t.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"},t.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."},t.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/mp3-jplayer-1.8.10.js
ADDED
@@ -0,0 +1,807 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
MP3-jPlayer 1.8.10
|
3 |
+
www.sjward.org
|
4 |
+
*/
|
5 |
+
|
6 |
+
var MP3_JPLAYER = {
|
7 |
+
|
8 |
+
tID: '',
|
9 |
+
state: '',
|
10 |
+
pl_info: [],
|
11 |
+
load_pc: 0,
|
12 |
+
played_t: 0,
|
13 |
+
dl_dialogs: [],
|
14 |
+
timeoutIDs: [],
|
15 |
+
intervalIDs: [],
|
16 |
+
jperrorIDs: [],
|
17 |
+
dl_domain: '',
|
18 |
+
jp_audio: {},
|
19 |
+
jp_seekable: 0,
|
20 |
+
sliding: false,
|
21 |
+
launched_ID: null,
|
22 |
+
jpID: '#mp3_jplayer_1_8',
|
23 |
+
plugin_path: '',
|
24 |
+
lastformats: '',
|
25 |
+
was_playing: false,
|
26 |
+
|
27 |
+
vars: {
|
28 |
+
play_f: false,
|
29 |
+
stylesheet_url: '',
|
30 |
+
dload_text: 'DOWNLOAD MP3',
|
31 |
+
pp_width: 280,
|
32 |
+
pp_maxheight: 350,
|
33 |
+
pp_bodycolour: '#fff',
|
34 |
+
pp_bodyimg: '',
|
35 |
+
pp_fixedcss: false,
|
36 |
+
pp_windowheight: 600,
|
37 |
+
pp_playerheight: 100+142,
|
38 |
+
force_dload: false,
|
39 |
+
message_interval: '<h2>Download MP3</h2><p style="margin-top:34px !important;">Your download should start in a second!</p>',
|
40 |
+
message_ok: '',
|
41 |
+
message_indark: '<h2>Download MP3</h2><p>Your download should start in a second!</p>',
|
42 |
+
message_promtlink: '<h2>Download MP3</h2><p>Link to the file:</p><h3><a target="_blank" href="#1">#2</a></h3><p>Depending on your browser settings, you may need to right click the link to save it.</p>',
|
43 |
+
message_fail: '<h2>Download Failed</h2><p>Sorry, something went wrong!</p>',
|
44 |
+
message_timeout: '<h2>Download<br />Unavailable</h2><p>please try again later!</p>',
|
45 |
+
dl_remote_path: ''
|
46 |
+
},
|
47 |
+
|
48 |
+
eID: {
|
49 |
+
play: '#playpause_mp3j_',
|
50 |
+
playW: '#playpause_wrap_mp3j_',
|
51 |
+
stp: '#stop_mp3j_',
|
52 |
+
prev: '#Prev_mp3j_',
|
53 |
+
next: '#Next_mp3j_',
|
54 |
+
vol: '#vol_mp3j_',
|
55 |
+
loader: '#load_mp3j_',
|
56 |
+
pos: '#posbar_mp3j_',
|
57 |
+
poscol: '#poscol_mp3j_',
|
58 |
+
title: '#T_mp3j_',
|
59 |
+
caption: '#C_mp3j_',
|
60 |
+
pT: '#P-Time-MI_',
|
61 |
+
tT: '#T-Time-MI_',
|
62 |
+
dload: '#download_mp3j_',
|
63 |
+
plwrap: '#L_mp3j_',
|
64 |
+
ul: '#UL_mp3j_',
|
65 |
+
a: 'mp3j_A_', //No hash!
|
66 |
+
indiM: '#statusMI_',
|
67 |
+
toglist: '#playlist-toggle_',
|
68 |
+
lPP: '#lpp_mp3j_',
|
69 |
+
pplink: '#mp3j_popout_',
|
70 |
+
img: '#MI_image_'
|
71 |
+
},
|
72 |
+
|
73 |
+
init: function () {
|
74 |
+
var plpath, that = this;
|
75 |
+
|
76 |
+
plpath = this.plugin_path.split('/');
|
77 |
+
this.dl_domain = plpath[2].replace(/^www./i, "");
|
78 |
+
|
79 |
+
this.unwrap();
|
80 |
+
this.write_controls();
|
81 |
+
this.add_jpconstruct_div();
|
82 |
+
|
83 |
+
jQuery(this.jpID).jPlayer({
|
84 |
+
ready: function () {
|
85 |
+
that.startup();
|
86 |
+
},
|
87 |
+
swfPath: that.plugin_path + '/js/Jplayer271.swf',
|
88 |
+
volume: 1,
|
89 |
+
supplied: "mp3",
|
90 |
+
wmode: "window",
|
91 |
+
solution:"html, flash",
|
92 |
+
preload: "none"
|
93 |
+
});
|
94 |
+
jQuery(this.jpID).bind(jQuery.jPlayer.event.ended, function(event) {
|
95 |
+
that.E_complete(that.tID);
|
96 |
+
});
|
97 |
+
jQuery(this.jpID).bind(jQuery.jPlayer.event.timeupdate, function(event) {
|
98 |
+
var lp = that.get_loaded(event);
|
99 |
+
var ppA = event.jPlayer.status.currentPercentAbsolute;
|
100 |
+
var pt = event.jPlayer.status.currentTime;
|
101 |
+
var tt = event.jPlayer.status.duration;
|
102 |
+
that.E_update(that.tID, lp, ppA, pt, tt);
|
103 |
+
});
|
104 |
+
jQuery(this.jpID).bind(jQuery.jPlayer.event.ready, function(event) {
|
105 |
+
if(event.jPlayer.html.used && event.jPlayer.html.audio.available) {
|
106 |
+
that.jp_audio = jQuery(that.jpID).data("jPlayer").htmlElement.audio;
|
107 |
+
} else {
|
108 |
+
that.jp_audio = 'flash';
|
109 |
+
}
|
110 |
+
});
|
111 |
+
jQuery(this.jpID).bind(jQuery.jPlayer.event.progress, function(event) {
|
112 |
+
var lp = that.get_loaded(event);
|
113 |
+
var pt = event.jPlayer.status.currentTime;
|
114 |
+
var tt = event.jPlayer.status.duration;
|
115 |
+
that.E_loading( that.tID, lp, tt, pt );
|
116 |
+
});
|
117 |
+
},
|
118 |
+
|
119 |
+
|
120 |
+
////
|
121 |
+
////
|
122 |
+
check_show_jperrors: function ( event ) {
|
123 |
+
if ( this.tID !== '' && this.jperrorIDs[ this.tID ] !== true ) {
|
124 |
+
if ( event.jPlayer.error.type === 'e_no_solution' || event.jPlayer.error.type === 'e_no_support' ) {
|
125 |
+
this.show_nosolution( this.tID );
|
126 |
+
this.jperrorIDs[ this.tID ] = true;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
},
|
130 |
+
|
131 |
+
show_nosolution: function ( j ) {
|
132 |
+
jQuery('#mp3j_nosolution_' + j).empty().append(this.vars.message_nosolution).fadeIn(200);
|
133 |
+
},
|
134 |
+
|
135 |
+
add_jpconstruct_div: function () {
|
136 |
+
var html = '<div id="mp3_jplayer_items" style="position:relative; overflow:hidden; margin:0; padding:0; border:0; width:0px; height:0px;"><div id="mp3_jplayer_1_8" style="left:-999em;"></div></div>';
|
137 |
+
jQuery('body').prepend( html );
|
138 |
+
},
|
139 |
+
|
140 |
+
////
|
141 |
+
////
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
get_loaded: function (event) {
|
146 |
+
var lp;
|
147 |
+
if ( typeof this.jp_audio.buffered === "object" ) {
|
148 |
+
if( this.jp_audio.buffered.length > 0 && this.jp_audio.duration > 0 ) {
|
149 |
+
lp = 100 * this.jp_audio.buffered.end(this.jp_audio.buffered.length-1) / this.jp_audio.duration;
|
150 |
+
} else {
|
151 |
+
lp = 0;
|
152 |
+
}
|
153 |
+
} else {
|
154 |
+
lp = event.jPlayer.status.seekPercent;
|
155 |
+
}
|
156 |
+
this.jp_seekable = event.jPlayer.status.seekPercent; //use this for slider calcs for both html/flash solution
|
157 |
+
this.load_pc = lp;
|
158 |
+
return lp;
|
159 |
+
},
|
160 |
+
|
161 |
+
Tformat: function ( sec ) {
|
162 |
+
var t = sec,
|
163 |
+
s = Math.floor((t)%60),
|
164 |
+
m = Math.floor((t/60)%60),
|
165 |
+
h = Math.floor(t/3600);
|
166 |
+
return ((h > 0) ? h+':' : '') + ((m > 9) ? m : '0'+m) + ':' + ((s > 9) ? s : '0'+s);
|
167 |
+
},
|
168 |
+
|
169 |
+
E_loading: function ( j, lp, tt, pt ) {
|
170 |
+
if (j !== '') {
|
171 |
+
jQuery(this.eID.loader + j).css( "width", lp + '%' );
|
172 |
+
if (this.pl_info[j].type === 'MI') {
|
173 |
+
if (tt > 0 && this.played_t > 0) {
|
174 |
+
jQuery(this.eID.tT + j).text(this.Tformat(tt));
|
175 |
+
}
|
176 |
+
}
|
177 |
+
if ( this.jp_audio !== 'flash' && lp < 100 ) {
|
178 |
+
if ( pt === this.played_t && this.state === 'playing' && pt > 0 && !this.sliding ) {
|
179 |
+
if (this.pl_info[j].type === 'MI') {
|
180 |
+
jQuery(this.eID.indiM + j).empty().append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Buffering');
|
181 |
+
}
|
182 |
+
if (this.pl_info[j].type === 'single' ) {
|
183 |
+
jQuery(this.eID.indiM + j).empty().append('<span class="Smp3-finding"></span><span class="mp3-gtint"></span> ' + this.Tformat(pt));
|
184 |
+
}
|
185 |
+
}
|
186 |
+
this.played_t = pt;
|
187 |
+
}
|
188 |
+
}
|
189 |
+
},
|
190 |
+
|
191 |
+
E_update: function (j, lp, ppA, pt, tt) {
|
192 |
+
if (j !== '') {
|
193 |
+
jQuery(this.eID.loader + j).css( "width", lp + '%' );
|
194 |
+
jQuery(this.eID.poscol + j).css( "width", ppA + '%' );
|
195 |
+
if ( jQuery(this.eID.pos + j + ' div.ui-widget-header').length > 0 ) {
|
196 |
+
jQuery(this.eID.pos + j).slider('option', 'value', 10*ppA);
|
197 |
+
}
|
198 |
+
if (pt > 0) {
|
199 |
+
jQuery(this.eID.pos + j).css( 'visibility', 'visible' );
|
200 |
+
}
|
201 |
+
if (this.pl_info[j].type === 'MI') {
|
202 |
+
jQuery(this.eID.pT + j).text(this.Tformat(pt));
|
203 |
+
}
|
204 |
+
if ('playing' === this.state) {
|
205 |
+
if ('MI' === this.pl_info[j].type) {
|
206 |
+
if (tt > 0 && this.played_t === pt && lp < 100 && !this.sliding ) {
|
207 |
+
jQuery(this.eID.indiM + j).empty().append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Buffering');
|
208 |
+
jQuery(this.eID.tT + j).text(this.Tformat(tt));
|
209 |
+
} else if (pt > 0) {
|
210 |
+
jQuery(this.eID.indiM + j).empty().append('Playing');
|
211 |
+
jQuery(this.eID.tT + j).text(this.Tformat(tt));
|
212 |
+
}
|
213 |
+
}
|
214 |
+
if ('single' === this.pl_info[j].type){
|
215 |
+
if (pt > 0 ) {
|
216 |
+
if (this.played_t === pt && lp < 100 && !this.sliding ) {
|
217 |
+
jQuery(this.eID.indiM + j).empty().append('<span class="Smp3-finding"></span><span class="mp3-gtint"></span> ' + this.Tformat(pt));
|
218 |
+
} else {
|
219 |
+
jQuery(this.eID.indiM + j).empty().append('<span class="mp3-tint tintmarg"></span> ' + this.Tformat(pt));
|
220 |
+
}
|
221 |
+
}
|
222 |
+
}
|
223 |
+
}
|
224 |
+
this.played_t = pt;
|
225 |
+
}
|
226 |
+
},
|
227 |
+
|
228 |
+
E_complete: function (j) {
|
229 |
+
var p = this.pl_info[j];
|
230 |
+
if ('MI' === p.type) {
|
231 |
+
if (p.loop || p.tr+1 < p.list.length) {
|
232 |
+
this.E_change_track(j, 'next');
|
233 |
+
} else {
|
234 |
+
this.E_dblstop(j);
|
235 |
+
this.startup();
|
236 |
+
}
|
237 |
+
}
|
238 |
+
if ('single' === p.type) {
|
239 |
+
if (p.loop) {
|
240 |
+
this.E_change_track(j, 'next');
|
241 |
+
} else {
|
242 |
+
this.E_stop(j);
|
243 |
+
this.startup();
|
244 |
+
}
|
245 |
+
}
|
246 |
+
},
|
247 |
+
|
248 |
+
write_controls: function () {
|
249 |
+
var j;
|
250 |
+
for (j = 0; j < this.pl_info.length; j += 1) {
|
251 |
+
this.setup_a_player(j);
|
252 |
+
}
|
253 |
+
},
|
254 |
+
|
255 |
+
startup: function () {
|
256 |
+
var j;
|
257 |
+
for (j = 0; j < this.pl_info.length; j += 1) {
|
258 |
+
//if (this.pl_info[j].autoplay) {
|
259 |
+
if ( this.pl_info[j].autoplay && (this.pl_info[j].type === 'single' || this.pl_info[j].type === 'MI') ) {
|
260 |
+
this.pl_info[j].autoplay = false;
|
261 |
+
this.E_change_track(j, this.pl_info[j].tr);
|
262 |
+
return;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
},
|
266 |
+
|
267 |
+
setup_a_player: function (j) {
|
268 |
+
var i, li, sel, that = this, p = this.pl_info[j];
|
269 |
+
|
270 |
+
//PLAYLISTERS and SINGLES
|
271 |
+
if ('MI' === p.type || 'single' === p.type) {
|
272 |
+
|
273 |
+
jQuery(this.eID.vol + j).slider({
|
274 |
+
value : p.vol,
|
275 |
+
max: 100,
|
276 |
+
range: 'min',
|
277 |
+
animate: false,
|
278 |
+
slide: function (event, ui) {
|
279 |
+
p.vol = ui.value;
|
280 |
+
if (j === that.tID) {
|
281 |
+
jQuery(that.jpID).jPlayer("volume", ui.value/100);
|
282 |
+
}
|
283 |
+
}
|
284 |
+
});
|
285 |
+
|
286 |
+
jQuery(this.eID.pos + j).mouseup(function (e) { //for posbar
|
287 |
+
that.sliding = false;
|
288 |
+
});
|
289 |
+
|
290 |
+
sel = ('MI' === p.type) ? this.eID.play : this.eID.playW;
|
291 |
+
jQuery(sel + j).click(function () { //play-pause click
|
292 |
+
that.E_change_track(j, p.tr);
|
293 |
+
jQuery(this).blur();
|
294 |
+
});
|
295 |
+
jQuery(sel + j).dblclick(function () { //play-pause dbl click
|
296 |
+
if (that.state !== "playing") {
|
297 |
+
that.E_change_track(j, p.tr);
|
298 |
+
}
|
299 |
+
jQuery(this).blur();
|
300 |
+
});
|
301 |
+
|
302 |
+
this.titles(j, p.tr);
|
303 |
+
}
|
304 |
+
|
305 |
+
//PLAYLISTERS
|
306 |
+
if ('MI' === p.type) {
|
307 |
+
jQuery(this.eID.pT + j).text('00:00');
|
308 |
+
jQuery(this.eID.indiM + j).text('Ready');
|
309 |
+
jQuery(this.eID.stp + j).click(function () {
|
310 |
+
that.E_stop(j);
|
311 |
+
});
|
312 |
+
jQuery(this.eID.stp + j).dblclick(function () {
|
313 |
+
that.E_dblstop(j);
|
314 |
+
});
|
315 |
+
|
316 |
+
jQuery(this.eID.plwrap + j).hide();
|
317 |
+
if (p.list.length > 1) {
|
318 |
+
jQuery(this.eID.next + j).click(function () {
|
319 |
+
that.E_change_track(j, 'next');
|
320 |
+
});
|
321 |
+
jQuery(this.eID.prev + j).click(function () {
|
322 |
+
that.E_change_track(j, 'prev');
|
323 |
+
});
|
324 |
+
jQuery(this.eID.ul + j).empty();
|
325 |
+
for (i = 0; i < p.list.length; i += 1) {
|
326 |
+
li = '<li>';
|
327 |
+
li += '<a href="#" id="' + this.eID.a + j + '_' + i + '">' + p.list[i].name + '</a></li>';
|
328 |
+
jQuery(this.eID.ul + j).append(li);
|
329 |
+
this.add_ul_click(j, i);
|
330 |
+
}
|
331 |
+
jQuery('#' + this.eID.a + j + '_' + p.tr).addClass('mp3j_A_current');
|
332 |
+
jQuery(this.eID.toglist + j).click(function () {
|
333 |
+
that.togglelist(j);
|
334 |
+
});
|
335 |
+
if (p.lstate === true) {
|
336 |
+
jQuery(this.eID.plwrap + j).show();
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
this.writedownload(j, p.tr);
|
341 |
+
if ( this.vars.force_dload === true ) {
|
342 |
+
this.dl_closeinfo_click(j);
|
343 |
+
}
|
344 |
+
|
345 |
+
jQuery(this.eID.lPP + j).click(function () {
|
346 |
+
return that.E_launchPP(j);
|
347 |
+
});
|
348 |
+
}
|
349 |
+
|
350 |
+
//POPOUT LINKS
|
351 |
+
if ('popout' === p.type) {
|
352 |
+
jQuery(this.eID.pplink + j).click(function () {
|
353 |
+
return that.E_launchPP(j);
|
354 |
+
});
|
355 |
+
}
|
356 |
+
},
|
357 |
+
|
358 |
+
add_ul_click: function (j, i) { //playlist item click
|
359 |
+
var that = this;
|
360 |
+
jQuery('#' + this.eID.a + j + "_" + i).click(function (e) {
|
361 |
+
that.E_change_track(j, i);
|
362 |
+
e.preventDefault();
|
363 |
+
});
|
364 |
+
},
|
365 |
+
|
366 |
+
unwrap: function () {
|
367 |
+
var i, j, arr;
|
368 |
+
if (this.vars.play_f === true && typeof this.lists !== "undefined" && this.lists.length > 0) {
|
369 |
+
for (i = 0; i < this.lists.length; i += 1) {
|
370 |
+
arr = this.lists[i];
|
371 |
+
for (j = 0; j < arr.length; j += 1) {
|
372 |
+
arr[j].mp3 = this.f_undo.f_con(arr[j].mp3);
|
373 |
+
}
|
374 |
+
}
|
375 |
+
}
|
376 |
+
},
|
377 |
+
|
378 |
+
f_undo: {
|
379 |
+
keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
380 |
+
f_con : function (input) {
|
381 |
+
var output = "", i = 0, chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
382 |
+
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
383 |
+
while (i < input.length) {
|
384 |
+
enc1 = this.keyStr.indexOf(input.charAt(i++)); enc2 = this.keyStr.indexOf(input.charAt(i++));
|
385 |
+
enc3 = this.keyStr.indexOf(input.charAt(i++)); enc4 = this.keyStr.indexOf(input.charAt(i++));
|
386 |
+
chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4;
|
387 |
+
output = output + String.fromCharCode(chr1);
|
388 |
+
if (enc3 !== 64) { output = output + String.fromCharCode(chr2); }
|
389 |
+
if (enc4 !== 64) { output = output + String.fromCharCode(chr3); }
|
390 |
+
}
|
391 |
+
output = this.utf8_f_con(output);
|
392 |
+
return output;
|
393 |
+
},
|
394 |
+
utf8_f_con : function (utftext) {
|
395 |
+
var string = "", i = 0, c, c1, c2, c3;
|
396 |
+
while (i < utftext.length) {
|
397 |
+
c = utftext.charCodeAt(i);
|
398 |
+
if (c < 128) {
|
399 |
+
string += String.fromCharCode(c); i++;
|
400 |
+
} else if ((c > 191) && (c < 224)) {
|
401 |
+
c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2;
|
402 |
+
} else {
|
403 |
+
c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3;
|
404 |
+
}
|
405 |
+
}
|
406 |
+
return string;
|
407 |
+
}
|
408 |
+
},
|
409 |
+
|
410 |
+
|
411 |
+
E_stop: function (j) {
|
412 |
+
if (j === this.tID && j !== '') {
|
413 |
+
this.clearit();
|
414 |
+
if ( jQuery(this.eID.pos + j + ' div.ui-widget-header').length > 0 ) {
|
415 |
+
jQuery(this.eID.pos + j).slider('destroy');
|
416 |
+
}
|
417 |
+
jQuery(this.eID.loader + j).css( "width", '0%' );
|
418 |
+
this.button(j, 'play');
|
419 |
+
if (this.pl_info[j].type === 'MI') {
|
420 |
+
jQuery(this.eID.poscol + j).css( "width", '0%' );
|
421 |
+
jQuery(this.eID.tT + j).empty();
|
422 |
+
jQuery(this.eID.indiM + j).text('Stopped');
|
423 |
+
jQuery(this.eID.pT + j).text(this.Tformat(0));
|
424 |
+
} else {
|
425 |
+
jQuery(this.eID.indiM + j).empty();
|
426 |
+
}
|
427 |
+
this.load_pc = 0;
|
428 |
+
this.played_t = 0;
|
429 |
+
}
|
430 |
+
},
|
431 |
+
|
432 |
+
E_dblstop: function (j) {
|
433 |
+
this.listclass(j, this.pl_info[j].tr, 0);
|
434 |
+
if ( this.pl_info[j].tr !== 0 ) {
|
435 |
+
this.titles(j, 0);
|
436 |
+
}
|
437 |
+
this.writedownload(j, 0);
|
438 |
+
this.E_stop(j);
|
439 |
+
jQuery(this.eID.indiM + j).text('Ready');
|
440 |
+
this.pl_info[j].tr = 0;
|
441 |
+
},
|
442 |
+
|
443 |
+
E_change_track: function (j, change) {
|
444 |
+
var track, txt, p = this.pl_info[j];
|
445 |
+
if (j === this.tID && change === p.tr) {
|
446 |
+
if ('playing' === this.state) {
|
447 |
+
if (this.load_pc === 0) {
|
448 |
+
this.E_stop(j);
|
449 |
+
} else {
|
450 |
+
this.pauseit();
|
451 |
+
this.button(j, 'play');
|
452 |
+
if ('MI' === p.type) {
|
453 |
+
jQuery(this.eID.indiM + j).text('Paused');
|
454 |
+
}
|
455 |
+
}
|
456 |
+
return;
|
457 |
+
} else if ('paused' === this.state || 'set' === this.state) {
|
458 |
+
this.playit();
|
459 |
+
this.button(j, 'pause');
|
460 |
+
return;
|
461 |
+
}
|
462 |
+
}
|
463 |
+
this.E_stop(this.tID);
|
464 |
+
if ('prev' === change) {
|
465 |
+
track = (p.tr-1 < 0) ? p.list.length-1 : p.tr-1;
|
466 |
+
} else if ('next' === change) {
|
467 |
+
track = (p.tr+1 < p.list.length) ? p.tr+1 : 0;
|
468 |
+
} else {
|
469 |
+
track = change;
|
470 |
+
}
|
471 |
+
jQuery(this.jpID).jPlayer("volume", 1 ); //Vol scaling fix
|
472 |
+
this.setit(p.list[track].mp3);
|
473 |
+
this.playit();
|
474 |
+
jQuery(this.jpID).jPlayer("volume", p.vol/100 ); //Reset to correct vol
|
475 |
+
txt = ('MI' === p.type) ? '<span class="mp3-finding"></span><span class="mp3-tint"></span>Connecting' : '<span class="Smp3-finding"></span><span class="mp3-gtint"></span>';
|
476 |
+
jQuery(this.eID.indiM + j).empty().append(txt);
|
477 |
+
this.button(j, 'pause');
|
478 |
+
this.makeslider(j);
|
479 |
+
if ('MI' === p.type) {
|
480 |
+
this.listclass(j, p.tr, track);
|
481 |
+
if ( p.tr !== track ) {
|
482 |
+
this.titles(j, track);
|
483 |
+
}
|
484 |
+
if (p.download) {
|
485 |
+
this.writedownload(j, track);
|
486 |
+
jQuery(this.eID.dload + j).hide().addClass('whilelinks').fadeIn(400);
|
487 |
+
}
|
488 |
+
}
|
489 |
+
p.tr = track;
|
490 |
+
this.tID = j;
|
491 |
+
},
|
492 |
+
|
493 |
+
E_launchPP: function (j) {
|
494 |
+
var li_height = 28;
|
495 |
+
if ( this.pl_info[j].height !== false ) {
|
496 |
+
this.vars.pp_playerheight = 100 + this.pl_info[j].height;
|
497 |
+
}
|
498 |
+
this.vars.pp_windowheight = ( this.pl_info[j].list.length > 1 ) ? this.vars.pp_playerheight + ( this.pl_info[j].list.length * li_height) : this.vars.pp_playerheight;
|
499 |
+
if ( this.vars.pp_windowheight > this.vars.pp_maxheight ) {
|
500 |
+
this.vars.pp_windowheight = this.vars.pp_maxheight;
|
501 |
+
}
|
502 |
+
this.launched_ID = j;
|
503 |
+
this.was_playing = ( this.state === "playing" ) ? true : false;
|
504 |
+
|
505 |
+
this.E_stop(this.tID);
|
506 |
+
this.setit(this.plugin_path + '/mp3/silence.mp3');
|
507 |
+
this.playit(); //make chrome let go of last track (incase it didn't finish loading)
|
508 |
+
this.clearit();
|
509 |
+
|
510 |
+
var newwindow = window.open(this.plugin_path + '/popout.php', 'mp3jpopout', 'height=300, width=600, location=1, status=1, scrollbars=1, resizable=1, left=25, top=25');
|
511 |
+
if ( this.pl_info[j].lstate === true ) {
|
512 |
+
newwindow.resizeTo( this.vars.pp_width, this.vars.pp_windowheight );
|
513 |
+
} else {
|
514 |
+
newwindow.resizeTo( this.vars.pp_width, this.vars.pp_playerheight );
|
515 |
+
}
|
516 |
+
if (window.focus) {
|
517 |
+
newwindow.focus();
|
518 |
+
}
|
519 |
+
return false;
|
520 |
+
},
|
521 |
+
|
522 |
+
setit: function (file) {
|
523 |
+
this.state = 'set';
|
524 |
+
jQuery(this.jpID).jPlayer("setMedia", {mp3: file});
|
525 |
+
},
|
526 |
+
playit: function () {
|
527 |
+
this.state = 'playing';
|
528 |
+
jQuery(this.jpID).jPlayer("play");
|
529 |
+
},
|
530 |
+
pauseit: function () {
|
531 |
+
this.state = 'paused';
|
532 |
+
jQuery(this.jpID).jPlayer("pause");
|
533 |
+
},
|
534 |
+
clearit: function () {
|
535 |
+
this.state = '';
|
536 |
+
jQuery(this.jpID).jPlayer("clearMedia");
|
537 |
+
},
|
538 |
+
|
539 |
+
button: function (j, type) {
|
540 |
+
if (j === '') { return; }
|
541 |
+
if ('pause' === type) {
|
542 |
+
if (this.pl_info[j].play_txt === '#USE_G#') {
|
543 |
+
jQuery(this.eID.play + j).removeClass('buttons_mp3j').addClass('buttons_mp3jpause');
|
544 |
+
} else {
|
545 |
+
jQuery(this.eID.play + j).text(this.pl_info[j].pause_txt);
|
546 |
+
}
|
547 |
+
}
|
548 |
+
if ('play' === type) {
|
549 |
+
if (this.pl_info[j].play_txt === '#USE_G#') {
|
550 |
+
jQuery(this.eID.play + j).removeClass('buttons_mp3jpause').addClass('buttons_mp3j');
|
551 |
+
} else {
|
552 |
+
jQuery(this.eID.play + j).text(this.pl_info[j].play_txt);
|
553 |
+
}
|
554 |
+
}
|
555 |
+
},
|
556 |
+
|
557 |
+
listclass: function ( j, rem, add ) {
|
558 |
+
jQuery('#'+ this.eID.a + j +'_'+ rem).removeClass('mp3j_A_current');
|
559 |
+
jQuery('#'+ this.eID.a + j +'_'+ add).addClass('mp3j_A_current');
|
560 |
+
},
|
561 |
+
|
562 |
+
titles: function ( j, track ) {
|
563 |
+
var p = this.pl_info[j], Olink = '', Clink = '';
|
564 |
+
if (p.type === "MI") {
|
565 |
+
jQuery(this.eID.title + j).empty().append(p.list[track].name).append('<br /><span>' + p.list[track].artist + '</span>');
|
566 |
+
if (p.list[track].image !== '') {
|
567 |
+
if (p.list[track].imgurl !== '') {
|
568 |
+
Olink = '<a href="' + p.list[track].imgurl + '">';
|
569 |
+
Clink = '</a>';
|
570 |
+
}
|
571 |
+
jQuery(this.eID.img + j).empty().hide().append(Olink + '<img src="' + p.list[track].image + '" />' + Clink).fadeIn(300);
|
572 |
+
}
|
573 |
+
}
|
574 |
+
},
|
575 |
+
|
576 |
+
writedownload: function ( j, track ) {
|
577 |
+
var p = this.pl_info[j];
|
578 |
+
if (p.download) {
|
579 |
+
jQuery(this.eID.dload + j).empty().removeClass('whilelinks').append('<a id="mp3j_dlanchor_' + j + '" href="' + p.list[track].mp3 + '" target="_blank">' + this.vars.dload_text + '</a>');
|
580 |
+
if ( this.vars.force_dload === true ) {
|
581 |
+
this.dl_button_click( j );
|
582 |
+
}
|
583 |
+
}
|
584 |
+
},
|
585 |
+
|
586 |
+
togglelist: function ( j ) {
|
587 |
+
if (this.pl_info[j].lstate === true) {
|
588 |
+
jQuery(this.eID.plwrap + j).fadeOut(300);
|
589 |
+
jQuery(this.eID.toglist + j).text('SHOW');
|
590 |
+
this.pl_info[j].lstate = false;
|
591 |
+
} else if (this.pl_info[j].lstate === false) {
|
592 |
+
jQuery(this.eID.plwrap + j).fadeIn("slow");
|
593 |
+
jQuery(this.eID.toglist + j).text('HIDE');
|
594 |
+
this.pl_info[j].lstate = true;
|
595 |
+
}
|
596 |
+
},
|
597 |
+
|
598 |
+
makeslider: function (j) {
|
599 |
+
var phmove, cssmove, that = this;
|
600 |
+
jQuery(this.eID.pos + j).css( 'visibility', 'hidden' );
|
601 |
+
jQuery(this.eID.pos + j).slider({
|
602 |
+
max: 1000,
|
603 |
+
range: 'min',
|
604 |
+
animate: false,
|
605 |
+
slide: function (event, ui) {
|
606 |
+
if ((ui.value/10) < that.load_pc) {
|
607 |
+
cssmove = ui.value/10;
|
608 |
+
phmove = ui.value*(10.0/that.jp_seekable);
|
609 |
+
} else {
|
610 |
+
cssmove = 0.99*that.load_pc;
|
611 |
+
phmove = (9.9*that.load_pc)*(10.0/that.jp_seekable);
|
612 |
+
}
|
613 |
+
jQuery(that.eID.poscol + j).css('width', cssmove + '%');
|
614 |
+
jQuery(that.jpID).jPlayer("playHead", phmove );
|
615 |
+
if (that.state === 'paused') {
|
616 |
+
that.button(j, 'pause');
|
617 |
+
that.playit();
|
618 |
+
}
|
619 |
+
that.state = 'playing';
|
620 |
+
that.sliding = true;
|
621 |
+
}
|
622 |
+
});
|
623 |
+
}
|
624 |
+
|
625 |
+
};
|
626 |
+
|
627 |
+
// Force browser download
|
628 |
+
MP3_JPLAYER.dl_button_click = function ( j ) {
|
629 |
+
var that = this, p = this.pl_info[j];
|
630 |
+
jQuery('#mp3j_dlanchor_' + j).click(function (e) {
|
631 |
+
that.dl_runinfo( p.list[p.tr].mp3, j, e );
|
632 |
+
e.preventDefault();
|
633 |
+
});
|
634 |
+
};
|
635 |
+
|
636 |
+
MP3_JPLAYER.dl_closeinfo_click = function ( j ) {
|
637 |
+
var that = this;
|
638 |
+
jQuery('#mp3j_finfo_close_' + j).click(function () {
|
639 |
+
that.dl_dialogue( j, '', 'close');
|
640 |
+
that.clear_timers( j );
|
641 |
+
});
|
642 |
+
};
|
643 |
+
|
644 |
+
MP3_JPLAYER.dl_runinfo = function ( get, j, e ) {
|
645 |
+
var can_write,
|
646 |
+
dlpath,
|
647 |
+
message,
|
648 |
+
that = this,
|
649 |
+
dlframe = false,
|
650 |
+
p = this.pl_info[j],
|
651 |
+
is_local = this.is_local_dload( get );
|
652 |
+
|
653 |
+
var enc_get;
|
654 |
+
|
655 |
+
if ( !this.intervalIDs[ j ] && !this.timeoutIDs[ j ] ) { //if timers not already running for this player
|
656 |
+
can_write = this.write_cookie('mp3Download' + j, 'waiting', '');
|
657 |
+
if ( is_local ) {
|
658 |
+
if ( can_write !== false ) {
|
659 |
+
this.dl_dialogue( j, this.vars.message_interval, 'check');
|
660 |
+
} else {
|
661 |
+
this.dl_dialogue( j, this.vars.message_indark, 'indark');
|
662 |
+
}
|
663 |
+
this.intervalIDs[ j ] = setInterval( function(){ that.dl_interval_check( j, can_write ); }, 500);
|
664 |
+
this.timeoutIDs[ j ] = setTimeout( function(){ that.dl_timeout( j, can_write ); }, 7000);
|
665 |
+
dlframe = true;
|
666 |
+
} else {
|
667 |
+
if ( this.vars.dl_remote_path === '' ) {
|
668 |
+
message = this.vars.message_promtlink.replace('#1', get);
|
669 |
+
message = message.replace('#2', p.list[p.tr].name);
|
670 |
+
this.dl_dialogue( j, message, 'indark');
|
671 |
+
} else {
|
672 |
+
message = this.vars.message_indark.replace('#1', get);
|
673 |
+
message = message.replace('#2', p.list[p.tr].name);
|
674 |
+
this.dl_dialogue( j, message, 'indark');
|
675 |
+
dlframe = true;
|
676 |
+
}
|
677 |
+
}
|
678 |
+
this.dl_dialogs[ j ] = 'false';
|
679 |
+
if ( dlframe ) {
|
680 |
+
dlpath = this.get_dloader_path( get );
|
681 |
+
enc_get = encodeURIComponent( get );
|
682 |
+
//jQuery('#mp3j_dlf_' + j).empty().append('<iframe id="mp3j_dlframe_' + j + '" name="mp3j_dlframe_' + j + '" class="mp3j-dlframe" src="' + dlpath + '?mp3=loc' + get + '&pID=' + j + '" style="display:none;"></iframe>');
|
683 |
+
jQuery('#mp3j_dlf_' + j).empty().append('<iframe id="mp3j_dlframe_' + j + '" name="mp3j_dlframe_' + j + '" class="mp3j-dlframe" src="' + dlpath + '?mp3=loc' + enc_get + '&pID=' + j + '" style="display:none;"></iframe>');
|
684 |
+
}
|
685 |
+
}
|
686 |
+
};
|
687 |
+
|
688 |
+
MP3_JPLAYER.dl_interval_check = function ( j, can_write ) {
|
689 |
+
if ( can_write !== false && this.read_cookie('mp3Download' + j) === 'true' ) { //got cookie back, all should be good
|
690 |
+
this.dl_dialogue( j, this.vars.message_ok, 'hide');
|
691 |
+
//jQuery('#debug').append('<br />check: cookie '+j+' true');
|
692 |
+
this.clear_timers( j );
|
693 |
+
} else if ( this.dl_dialogs[ j ] !== 'false' ) { //got a message back
|
694 |
+
this.dl_dialogue( j, this.dl_dialogs[ j ], 'add');
|
695 |
+
//jQuery('#debug').append('<br />check: dialog'+j+' true');
|
696 |
+
this.clear_timers( j );
|
697 |
+
} //else {
|
698 |
+
//jQuery('#debug').append('<br />check: neither '+j+'...# ');
|
699 |
+
//}
|
700 |
+
};
|
701 |
+
|
702 |
+
MP3_JPLAYER.dl_timeout = function ( j, can_write ) {
|
703 |
+
this.clear_timers( j );
|
704 |
+
if ( can_write !== false ) {
|
705 |
+
this.dl_dialogue( j, this.vars.message_timeout, 'add');
|
706 |
+
}
|
707 |
+
//jQuery('#debug').append('<br />no responses ('+j+' timed out) ');
|
708 |
+
};
|
709 |
+
|
710 |
+
MP3_JPLAYER.clear_timers = function ( j ) {
|
711 |
+
if ( this.intervalIDs[ j ] !== null && this.timeoutIDs[ j ] !== null ) {
|
712 |
+
clearInterval( this.intervalIDs[j] );
|
713 |
+
clearTimeout( this.timeoutIDs[j] );
|
714 |
+
this.intervalIDs[ j ] = null;
|
715 |
+
this.timeoutIDs[j] = null;
|
716 |
+
}
|
717 |
+
jQuery('#mp3j_dlf_' + j).empty(); //ditch iframe
|
718 |
+
this.write_cookie('mp3Download' + j, '', -1); //clear any cookie
|
719 |
+
//jQuery('#debug').append('<br />cookie/frame '+j+' cleared');
|
720 |
+
};
|
721 |
+
|
722 |
+
MP3_JPLAYER.dl_dialogue = function ( j, text, state ) {
|
723 |
+
if ( 'check' === state ) {
|
724 |
+
jQuery('#mp3j_finfo_gif_' + j).show();
|
725 |
+
jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
|
726 |
+
jQuery('#mp3j_finfo_' + j).show();
|
727 |
+
} else if ( 'add' === state ) {
|
728 |
+
jQuery('#mp3j_finfo_gif_' + j).hide();
|
729 |
+
jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
|
730 |
+
} else if ( 'indark' === state ) {
|
731 |
+
jQuery('#mp3j_finfo_gif_' + j).hide();
|
732 |
+
jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
|
733 |
+
jQuery('#mp3j_finfo_' + j).fadeIn(100);
|
734 |
+
} else if ( 'close' === state ) {
|
735 |
+
jQuery('#mp3j_finfo_gif_' + j).hide();
|
736 |
+
jQuery('#mp3j_finfo_' + j).hide();
|
737 |
+
} else {
|
738 |
+
jQuery('#mp3j_finfo_gif_' + j).hide();
|
739 |
+
if ( text !== '' ) {
|
740 |
+
jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
|
741 |
+
}
|
742 |
+
jQuery('#mp3j_finfo_' + j).fadeOut(1000);
|
743 |
+
}
|
744 |
+
};
|
745 |
+
|
746 |
+
MP3_JPLAYER.read_cookie = function ( name ) {
|
747 |
+
var i, cookie, allCookies = document.cookie.split('; ');
|
748 |
+
if ( allCookies.length > 0 ) {
|
749 |
+
for ( i = 0; i < allCookies.length; i += 1 ) {
|
750 |
+
cookie = allCookies[i].split( '=' );
|
751 |
+
if ( cookie[0] === name ) {
|
752 |
+
return cookie[1];
|
753 |
+
}
|
754 |
+
}
|
755 |
+
}
|
756 |
+
return false;
|
757 |
+
};
|
758 |
+
|
759 |
+
MP3_JPLAYER.write_cookie = function ( name, value, days ) {
|
760 |
+
var date, expires = "";
|
761 |
+
if ( days ) {
|
762 |
+
date = new Date();
|
763 |
+
date.setTime( date.getTime() + (days*24*60*60*1000) );
|
764 |
+
expires = "; expires=" + date.toGMTString();
|
765 |
+
}
|
766 |
+
document.cookie = name + "=" + value + expires + "; path=/";
|
767 |
+
return this.read_cookie( name );
|
768 |
+
};
|
769 |
+
|
770 |
+
MP3_JPLAYER.get_dloader_path = function ( loc ) {
|
771 |
+
var k, path = "", file = "", chunks;
|
772 |
+
chunks = loc.split('/');
|
773 |
+
file = chunks[chunks.length-1];
|
774 |
+
//jQuery('#debug').append('<br />');
|
775 |
+
//for ( k = 0; k < chunks.length; k += 1 ) {
|
776 |
+
// jQuery('#debug').append('<br />[' + k + '] ' + chunks[k]);
|
777 |
+
//}
|
778 |
+
//jQuery('#debug').append('<br />file:' + file);
|
779 |
+
if ( loc.charAt(0) === '/' ) {
|
780 |
+
path = this.plugin_path + '/download.php';
|
781 |
+
} else {
|
782 |
+
path = chunks[2].replace(/^www./i, "");
|
783 |
+
if ( path === this.dl_domain ) {
|
784 |
+
path = this.plugin_path + '/download.php';
|
785 |
+
} else {
|
786 |
+
path = chunks[0] + '//' + chunks[2] + this.vars.dl_remote_path;
|
787 |
+
}
|
788 |
+
}
|
789 |
+
//jQuery('#debug').append('<br />path:' + path);
|
790 |
+
return path;
|
791 |
+
};
|
792 |
+
|
793 |
+
MP3_JPLAYER.is_local_dload = function ( loc ) {
|
794 |
+
var domain = "", file = "", chunks, is_local = false;
|
795 |
+
chunks = loc.split('/');
|
796 |
+
file = chunks[chunks.length-1];
|
797 |
+
if ( loc.charAt(0) === '/' ) {
|
798 |
+
is_local = true;
|
799 |
+
} else {
|
800 |
+
domain = chunks[2].replace(/^www./i, "");
|
801 |
+
if ( domain === this.dl_domain ) {
|
802 |
+
is_local = true;
|
803 |
+
}
|
804 |
+
}
|
805 |
+
return is_local;
|
806 |
+
};
|
807 |
+
|
js/mp3-jplayer-1.8.8.js
DELETED
@@ -1,1552 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
|
3 |
-
MP3-jPlayer 1.8.9
|
4 |
-
|
5 |
-
www.sjward.org
|
6 |
-
|
7 |
-
*/
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
var MP3_JPLAYER = {
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
tID: '',
|
16 |
-
|
17 |
-
state: '',
|
18 |
-
|
19 |
-
pl_info: [],
|
20 |
-
|
21 |
-
load_pc: 0,
|
22 |
-
|
23 |
-
played_t: 0,
|
24 |
-
|
25 |
-
dl_dialogs: [],
|
26 |
-
|
27 |
-
timeoutIDs: [],
|
28 |
-
|
29 |
-
intervalIDs: [],
|
30 |
-
|
31 |
-
dl_domain: '',
|
32 |
-
|
33 |
-
jp_audio: {},
|
34 |
-
|
35 |
-
jp_seekable: 0,
|
36 |
-
|
37 |
-
sliding: false,
|
38 |
-
|
39 |
-
launched_ID: null,
|
40 |
-
|
41 |
-
jpID: '#mp3_jplayer_1_8',
|
42 |
-
|
43 |
-
plugin_path: '',
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
vars: {
|
48 |
-
|
49 |
-
play_f: false,
|
50 |
-
|
51 |
-
stylesheet_url: '',
|
52 |
-
|
53 |
-
dload_text: 'DOWNLOAD MP3',
|
54 |
-
|
55 |
-
pp_width: 280,
|
56 |
-
|
57 |
-
pp_maxheight: 350,
|
58 |
-
|
59 |
-
pp_bodycolour: '#fff',
|
60 |
-
|
61 |
-
pp_bodyimg: '',
|
62 |
-
|
63 |
-
pp_fixedcss: false,
|
64 |
-
|
65 |
-
pp_windowheight: 600,
|
66 |
-
|
67 |
-
pp_playerheight: 100+142,
|
68 |
-
|
69 |
-
force_dload: false,
|
70 |
-
|
71 |
-
message_interval: '<h2>Download MP3</h2><p style="margin-top:34px !important;">Your download should start in a second!</p>',
|
72 |
-
|
73 |
-
message_ok: '',
|
74 |
-
|
75 |
-
message_indark: '<h2>Download MP3</h2><p>Your download should start in a second!</p>',
|
76 |
-
|
77 |
-
message_promtlink: '<h2>Download MP3</h2><p>Link to the file:</p><h3><a target="_blank" href="#1">#2</a></h3><p>Depending on your browser settings, you may need to right click the link to save it.</p>',
|
78 |
-
|
79 |
-
message_fail: '<h2>Download Failed</h2><p>Sorry, something went wrong!</p>',
|
80 |
-
|
81 |
-
message_timeout: '<h2>Download<br />Unavailable</h2><p>please try again later!</p>',
|
82 |
-
|
83 |
-
dl_remote_path: ''
|
84 |
-
|
85 |
-
},
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
eID: {
|
90 |
-
|
91 |
-
play: '#playpause_mp3j_',
|
92 |
-
|
93 |
-
playW: '#playpause_wrap_mp3j_',
|
94 |
-
|
95 |
-
stp: '#stop_mp3j_',
|
96 |
-
|
97 |
-
prev: '#Prev_mp3j_',
|
98 |
-
|
99 |
-
next: '#Next_mp3j_',
|
100 |
-
|
101 |
-
vol: '#vol_mp3j_',
|
102 |
-
|
103 |
-
loader: '#load_mp3j_',
|
104 |
-
|
105 |
-
pos: '#posbar_mp3j_',
|
106 |
-
|
107 |
-
poscol: '#poscol_mp3j_',
|
108 |
-
|
109 |
-
title: '#T_mp3j_',
|
110 |
-
|
111 |
-
caption: '#C_mp3j_',
|
112 |
-
|
113 |
-
pT: '#P-Time-MI_',
|
114 |
-
|
115 |
-
tT: '#T-Time-MI_',
|
116 |
-
|
117 |
-
dload: '#download_mp3j_',
|
118 |
-
|
119 |
-
plwrap: '#L_mp3j_',
|
120 |
-
|
121 |
-
ul: '#UL_mp3j_',
|
122 |
-
|
123 |
-
a: 'mp3j_A_', //No hash!
|
124 |
-
|
125 |
-
indiM: '#statusMI_',
|
126 |
-
|
127 |
-
toglist: '#playlist-toggle_',
|
128 |
-
|
129 |
-
lPP: '#lpp_mp3j_',
|
130 |
-
|
131 |
-
pplink: '#mp3j_popout_',
|
132 |
-
|
133 |
-
img: '#MI_image_'
|
134 |
-
|
135 |
-
},
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
init: function () {
|
140 |
-
|
141 |
-
var plpath, that = this;
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
plpath = this.plugin_path.split('/');
|
146 |
-
|
147 |
-
this.dl_domain = plpath[2].replace(/^www./i, "");
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
this.unwrap();
|
152 |
-
|
153 |
-
this.write_controls();
|
154 |
-
|
155 |
-
jQuery(this.jpID).jPlayer({
|
156 |
-
|
157 |
-
ready: function () {
|
158 |
-
|
159 |
-
that.startup();
|
160 |
-
|
161 |
-
},
|
162 |
-
|
163 |
-
swfPath: that.plugin_path + '/js/Jplayer271.swf',
|
164 |
-
|
165 |
-
volume: 1,
|
166 |
-
|
167 |
-
supplied: "mp3",
|
168 |
-
|
169 |
-
wmode: "window",
|
170 |
-
|
171 |
-
solution:"html, flash",
|
172 |
-
|
173 |
-
preload: "none"
|
174 |
-
|
175 |
-
});
|
176 |
-
|
177 |
-
jQuery(this.jpID).bind(jQuery.jPlayer.event.ended, function(event) {
|
178 |
-
|
179 |
-
that.E_complete(that.tID);
|
180 |
-
|
181 |
-
});
|
182 |
-
|
183 |
-
jQuery(this.jpID).bind(jQuery.jPlayer.event.timeupdate, function(event) {
|
184 |
-
|
185 |
-
var lp = that.get_loaded(event);
|
186 |
-
|
187 |
-
var ppA = event.jPlayer.status.currentPercentAbsolute;
|
188 |
-
|
189 |
-
var pt = event.jPlayer.status.currentTime;
|
190 |
-
|
191 |
-
var tt = event.jPlayer.status.duration;
|
192 |
-
|
193 |
-
that.E_update(that.tID, lp, ppA, pt, tt);
|
194 |
-
|
195 |
-
});
|
196 |
-
|
197 |
-
jQuery(this.jpID).bind(jQuery.jPlayer.event.ready, function(event) {
|
198 |
-
|
199 |
-
if(event.jPlayer.html.used && event.jPlayer.html.audio.available) {
|
200 |
-
|
201 |
-
that.jp_audio = jQuery(that.jpID).data("jPlayer").htmlElement.audio;
|
202 |
-
|
203 |
-
} else {
|
204 |
-
|
205 |
-
that.jp_audio = 'flash';
|
206 |
-
|
207 |
-
}
|
208 |
-
|
209 |
-
});
|
210 |
-
|
211 |
-
jQuery(this.jpID).bind(jQuery.jPlayer.event.progress, function(event) {
|
212 |
-
|
213 |
-
var lp = that.get_loaded(event);
|
214 |
-
|
215 |
-
var pt = event.jPlayer.status.currentTime;
|
216 |
-
|
217 |
-
var tt = event.jPlayer.status.duration;
|
218 |
-
|
219 |
-
that.E_loading( that.tID, lp, tt, pt );
|
220 |
-
|
221 |
-
});
|
222 |
-
|
223 |
-
},
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
get_loaded: function (event) {
|
228 |
-
|
229 |
-
var lp;
|
230 |
-
|
231 |
-
if ( typeof this.jp_audio.buffered === "object" ) {
|
232 |
-
|
233 |
-
if( this.jp_audio.buffered.length > 0 && this.jp_audio.duration > 0 ) {
|
234 |
-
|
235 |
-
lp = 100 * this.jp_audio.buffered.end(this.jp_audio.buffered.length-1) / this.jp_audio.duration;
|
236 |
-
|
237 |
-
} else {
|
238 |
-
|
239 |
-
lp = 0;
|
240 |
-
|
241 |
-
}
|
242 |
-
|
243 |
-
} else {
|
244 |
-
|
245 |
-
lp = event.jPlayer.status.seekPercent;
|
246 |
-
|
247 |
-
}
|
248 |
-
|
249 |
-
this.jp_seekable = event.jPlayer.status.seekPercent; //use this for slider calcs for both html/flash solution
|
250 |
-
|
251 |
-
this.load_pc = lp;
|
252 |
-
|
253 |
-
return lp;
|
254 |
-
|
255 |
-
},
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
Tformat: function ( sec ) {
|
260 |
-
|
261 |
-
var t = sec,
|
262 |
-
|
263 |
-
s = Math.floor((t)%60),
|
264 |
-
|
265 |
-
m = Math.floor((t/60)%60),
|
266 |
-
|
267 |
-
h = Math.floor(t/3600);
|
268 |
-
|
269 |
-
return ((h > 0) ? h+':' : '') + ((m > 9) ? m : '0'+m) + ':' + ((s > 9) ? s : '0'+s);
|
270 |
-
|
271 |
-
},
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
E_loading: function ( j, lp, tt, pt ) {
|
276 |
-
|
277 |
-
if (j !== '') {
|
278 |
-
|
279 |
-
jQuery(this.eID.loader + j).css( "width", lp + '%' );
|
280 |
-
|
281 |
-
if (this.pl_info[j].type === 'MI') {
|
282 |
-
|
283 |
-
if (tt > 0 && this.played_t > 0) {
|
284 |
-
|
285 |
-
jQuery(this.eID.tT + j).text(this.Tformat(tt));
|
286 |
-
|
287 |
-
}
|
288 |
-
|
289 |
-
}
|
290 |
-
|
291 |
-
if ( this.jp_audio !== 'flash' && lp < 100 ) {
|
292 |
-
|
293 |
-
if ( pt === this.played_t && this.state === 'playing' && pt > 0 && !this.sliding ) {
|
294 |
-
|
295 |
-
if (this.pl_info[j].type === 'MI') {
|
296 |
-
|
297 |
-
jQuery(this.eID.indiM + j).empty().append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Buffering');
|
298 |
-
|
299 |
-
}
|
300 |
-
|
301 |
-
if (this.pl_info[j].type === 'single' ) {
|
302 |
-
|
303 |
-
jQuery(this.eID.indiM + j).empty().append('<span class="Smp3-finding"></span><span class="mp3-gtint"></span> ' + this.Tformat(pt));
|
304 |
-
|
305 |
-
}
|
306 |
-
|
307 |
-
}
|
308 |
-
|
309 |
-
this.played_t = pt;
|
310 |
-
|
311 |
-
}
|
312 |
-
|
313 |
-
}
|
314 |
-
|
315 |
-
},
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
E_update: function (j, lp, ppA, pt, tt) {
|
320 |
-
|
321 |
-
if (j !== '') {
|
322 |
-
|
323 |
-
jQuery(this.eID.loader + j).css( "width", lp + '%' );
|
324 |
-
|
325 |
-
jQuery(this.eID.poscol + j).css( "width", ppA + '%' );
|
326 |
-
|
327 |
-
if ( jQuery(this.eID.pos + j + ' div.ui-widget-header').length > 0 ) {
|
328 |
-
|
329 |
-
jQuery(this.eID.pos + j).slider('option', 'value', 10*ppA);
|
330 |
-
|
331 |
-
}
|
332 |
-
|
333 |
-
if (pt > 0) {
|
334 |
-
|
335 |
-
jQuery(this.eID.pos + j).css( 'visibility', 'visible' );
|
336 |
-
|
337 |
-
}
|
338 |
-
|
339 |
-
if (this.pl_info[j].type === 'MI') {
|
340 |
-
|
341 |
-
jQuery(this.eID.pT + j).text(this.Tformat(pt));
|
342 |
-
|
343 |
-
}
|
344 |
-
|
345 |
-
if ('playing' === this.state) {
|
346 |
-
|
347 |
-
if ('MI' === this.pl_info[j].type) {
|
348 |
-
|
349 |
-
if (tt > 0 && this.played_t === pt && lp < 100 && !this.sliding ) {
|
350 |
-
|
351 |
-
jQuery(this.eID.indiM + j).empty().append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Buffering');
|
352 |
-
|
353 |
-
jQuery(this.eID.tT + j).text(this.Tformat(tt));
|
354 |
-
|
355 |
-
} else if (pt > 0) {
|
356 |
-
|
357 |
-
jQuery(this.eID.indiM + j).empty().append('Playing');
|
358 |
-
|
359 |
-
jQuery(this.eID.tT + j).text(this.Tformat(tt));
|
360 |
-
|
361 |
-
}
|
362 |
-
|
363 |
-
}
|
364 |
-
|
365 |
-
if ('single' === this.pl_info[j].type){
|
366 |
-
|
367 |
-
if (pt > 0 ) {
|
368 |
-
|
369 |
-
if (this.played_t === pt && lp < 100 && !this.sliding ) {
|
370 |
-
|
371 |
-
jQuery(this.eID.indiM + j).empty().append('<span class="Smp3-finding"></span><span class="mp3-gtint"></span> ' + this.Tformat(pt));
|
372 |
-
|
373 |
-
} else {
|
374 |
-
|
375 |
-
jQuery(this.eID.indiM + j).empty().append('<span class="mp3-tint tintmarg"></span> ' + this.Tformat(pt));
|
376 |
-
|
377 |
-
}
|
378 |
-
|
379 |
-
}
|
380 |
-
|
381 |
-
}
|
382 |
-
|
383 |
-
}
|
384 |
-
|
385 |
-
this.played_t = pt;
|
386 |
-
|
387 |
-
}
|
388 |
-
|
389 |
-
},
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
E_complete: function (j) {
|
394 |
-
|
395 |
-
var p = this.pl_info[j];
|
396 |
-
|
397 |
-
if ('MI' === p.type) {
|
398 |
-
|
399 |
-
if (p.loop || p.tr+1 < p.list.length) {
|
400 |
-
|
401 |
-
this.E_change_track(j, 'next');
|
402 |
-
|
403 |
-
} else {
|
404 |
-
|
405 |
-
this.E_dblstop(j);
|
406 |
-
|
407 |
-
this.startup();
|
408 |
-
|
409 |
-
}
|
410 |
-
|
411 |
-
}
|
412 |
-
|
413 |
-
if ('single' === p.type) {
|
414 |
-
|
415 |
-
if (p.loop) {
|
416 |
-
|
417 |
-
this.E_change_track(j, 'next');
|
418 |
-
|
419 |
-
} else {
|
420 |
-
|
421 |
-
this.E_stop(j);
|
422 |
-
|
423 |
-
this.startup();
|
424 |
-
|
425 |
-
}
|
426 |
-
|
427 |
-
}
|
428 |
-
|
429 |
-
},
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
write_controls: function () {
|
434 |
-
|
435 |
-
var j;
|
436 |
-
|
437 |
-
for (j = 0; j < this.pl_info.length; j += 1) {
|
438 |
-
|
439 |
-
this.setup_a_player(j);
|
440 |
-
|
441 |
-
}
|
442 |
-
|
443 |
-
},
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
startup: function () {
|
448 |
-
|
449 |
-
var j;
|
450 |
-
|
451 |
-
for (j = 0; j < this.pl_info.length; j += 1) {
|
452 |
-
|
453 |
-
//if (this.pl_info[j].autoplay) {
|
454 |
-
|
455 |
-
if ( this.pl_info[j].autoplay && (this.pl_info[j].type === 'single' || this.pl_info[j].type === 'MI') ) {
|
456 |
-
|
457 |
-
this.pl_info[j].autoplay = false;
|
458 |
-
|
459 |
-
this.E_change_track(j, this.pl_info[j].tr);
|
460 |
-
|
461 |
-
return;
|
462 |
-
|
463 |
-
}
|
464 |
-
|
465 |
-
}
|
466 |
-
|
467 |
-
},
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
setup_a_player: function (j) {
|
472 |
-
|
473 |
-
var i, li, sel, that = this, p = this.pl_info[j];
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
//PLAYLISTERS and SINGLES
|
478 |
-
|
479 |
-
if ('MI' === p.type || 'single' === p.type) {
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
jQuery(this.eID.vol + j).slider({
|
484 |
-
|
485 |
-
value : p.vol,
|
486 |
-
|
487 |
-
max: 100,
|
488 |
-
|
489 |
-
range: 'min',
|
490 |
-
|
491 |
-
animate: false,
|
492 |
-
|
493 |
-
slide: function (event, ui) {
|
494 |
-
|
495 |
-
p.vol = ui.value;
|
496 |
-
|
497 |
-
if (j === that.tID) {
|
498 |
-
|
499 |
-
jQuery(that.jpID).jPlayer("volume", ui.value/100);
|
500 |
-
|
501 |
-
}
|
502 |
-
|
503 |
-
}
|
504 |
-
|
505 |
-
});
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
jQuery(this.eID.pos + j).mouseup(function (e) { //for posbar
|
510 |
-
|
511 |
-
that.sliding = false;
|
512 |
-
|
513 |
-
});
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
sel = ('MI' === p.type) ? this.eID.play : this.eID.playW;
|
518 |
-
|
519 |
-
jQuery(sel + j).click(function () { //play-pause click
|
520 |
-
|
521 |
-
that.E_change_track(j, p.tr);
|
522 |
-
|
523 |
-
jQuery(this).blur();
|
524 |
-
|
525 |
-
});
|
526 |
-
|
527 |
-
jQuery(sel + j).dblclick(function () { //play-pause dbl click
|
528 |
-
|
529 |
-
if (that.state !== "playing") {
|
530 |
-
|
531 |
-
that.E_change_track(j, p.tr);
|
532 |
-
|
533 |
-
}
|
534 |
-
|
535 |
-
jQuery(this).blur();
|
536 |
-
|
537 |
-
});
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
this.titles(j, p.tr);
|
542 |
-
|
543 |
-
}
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
//PLAYLISTERS
|
548 |
-
|
549 |
-
if ('MI' === p.type) {
|
550 |
-
|
551 |
-
jQuery(this.eID.pT + j).text('00:00');
|
552 |
-
|
553 |
-
jQuery(this.eID.indiM + j).text('Ready');
|
554 |
-
|
555 |
-
jQuery(this.eID.stp + j).click(function () {
|
556 |
-
|
557 |
-
that.E_stop(j);
|
558 |
-
|
559 |
-
});
|
560 |
-
|
561 |
-
jQuery(this.eID.stp + j).dblclick(function () {
|
562 |
-
|
563 |
-
that.E_dblstop(j);
|
564 |
-
|
565 |
-
});
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
jQuery(this.eID.plwrap + j).hide();
|
570 |
-
|
571 |
-
if (p.list.length > 1) {
|
572 |
-
|
573 |
-
jQuery(this.eID.next + j).click(function () {
|
574 |
-
|
575 |
-
that.E_change_track(j, 'next');
|
576 |
-
|
577 |
-
});
|
578 |
-
|
579 |
-
jQuery(this.eID.prev + j).click(function () {
|
580 |
-
|
581 |
-
that.E_change_track(j, 'prev');
|
582 |
-
|
583 |
-
});
|
584 |
-
|
585 |
-
jQuery(this.eID.ul + j).empty();
|
586 |
-
|
587 |
-
for (i = 0; i < p.list.length; i += 1) {
|
588 |
-
|
589 |
-
li = '<li>';
|
590 |
-
|
591 |
-
li += '<a href="#" id="' + this.eID.a + j + '_' + i + '">' + p.list[i].name + '</a></li>';
|
592 |
-
|
593 |
-
jQuery(this.eID.ul + j).append(li);
|
594 |
-
|
595 |
-
this.add_ul_click(j, i);
|
596 |
-
|
597 |
-
}
|
598 |
-
|
599 |
-
jQuery('#' + this.eID.a + j + '_' + p.tr).addClass('mp3j_A_current');
|
600 |
-
|
601 |
-
jQuery(this.eID.toglist + j).click(function () {
|
602 |
-
|
603 |
-
that.togglelist(j);
|
604 |
-
|
605 |
-
});
|
606 |
-
|
607 |
-
if (p.lstate === true) {
|
608 |
-
|
609 |
-
jQuery(this.eID.plwrap + j).show();
|
610 |
-
|
611 |
-
}
|
612 |
-
|
613 |
-
}
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
this.writedownload(j, p.tr);
|
618 |
-
|
619 |
-
if ( this.vars.force_dload === true ) {
|
620 |
-
|
621 |
-
this.dl_closeinfo_click(j);
|
622 |
-
|
623 |
-
}
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
jQuery(this.eID.lPP + j).click(function () {
|
628 |
-
|
629 |
-
return that.E_launchPP(j);
|
630 |
-
|
631 |
-
});
|
632 |
-
|
633 |
-
}
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
//POPOUT LINKS
|
638 |
-
|
639 |
-
if ('popout' === p.type) {
|
640 |
-
|
641 |
-
jQuery(this.eID.pplink + j).click(function () {
|
642 |
-
|
643 |
-
return that.E_launchPP(j);
|
644 |
-
|
645 |
-
});
|
646 |
-
|
647 |
-
}
|
648 |
-
|
649 |
-
},
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
add_ul_click: function (j, i) { //playlist item click
|
654 |
-
|
655 |
-
var that = this;
|
656 |
-
|
657 |
-
jQuery('#' + this.eID.a + j + "_" + i).click(function (e) {
|
658 |
-
|
659 |
-
that.E_change_track(j, i);
|
660 |
-
|
661 |
-
e.preventDefault();
|
662 |
-
|
663 |
-
});
|
664 |
-
|
665 |
-
},
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
unwrap: function () {
|
670 |
-
|
671 |
-
var i, j, arr;
|
672 |
-
|
673 |
-
if (this.vars.play_f === true && typeof this.lists !== "undefined" && this.lists.length > 0) {
|
674 |
-
|
675 |
-
for (i = 0; i < this.lists.length; i += 1) {
|
676 |
-
|
677 |
-
arr = this.lists[i];
|
678 |
-
|
679 |
-
for (j = 0; j < arr.length; j += 1) {
|
680 |
-
|
681 |
-
arr[j].mp3 = this.f_undo.f_con(arr[j].mp3);
|
682 |
-
|
683 |
-
}
|
684 |
-
|
685 |
-
}
|
686 |
-
|
687 |
-
}
|
688 |
-
|
689 |
-
},
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
f_undo: {
|
694 |
-
|
695 |
-
keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
696 |
-
|
697 |
-
f_con : function (input) {
|
698 |
-
|
699 |
-
var output = "", i = 0, chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
700 |
-
|
701 |
-
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
702 |
-
|
703 |
-
while (i < input.length) {
|
704 |
-
|
705 |
-
enc1 = this.keyStr.indexOf(input.charAt(i++)); enc2 = this.keyStr.indexOf(input.charAt(i++));
|
706 |
-
|
707 |
-
enc3 = this.keyStr.indexOf(input.charAt(i++)); enc4 = this.keyStr.indexOf(input.charAt(i++));
|
708 |
-
|
709 |
-
chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4;
|
710 |
-
|
711 |
-
output = output + String.fromCharCode(chr1);
|
712 |
-
|
713 |
-
if (enc3 !== 64) { output = output + String.fromCharCode(chr2); }
|
714 |
-
|
715 |
-
if (enc4 !== 64) { output = output + String.fromCharCode(chr3); }
|
716 |
-
|
717 |
-
}
|
718 |
-
|
719 |
-
output = this.utf8_f_con(output);
|
720 |
-
|
721 |
-
return output;
|
722 |
-
|
723 |
-
},
|
724 |
-
|
725 |
-
utf8_f_con : function (utftext) {
|
726 |
-
|
727 |
-
var string = "", i = 0, c, c1, c2, c3;
|
728 |
-
|
729 |
-
while (i < utftext.length) {
|
730 |
-
|
731 |
-
c = utftext.charCodeAt(i);
|
732 |
-
|
733 |
-
if (c < 128) {
|
734 |
-
|
735 |
-
string += String.fromCharCode(c); i++;
|
736 |
-
|
737 |
-
} else if ((c > 191) && (c < 224)) {
|
738 |
-
|
739 |
-
c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2;
|
740 |
-
|
741 |
-
} else {
|
742 |
-
|
743 |
-
c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3;
|
744 |
-
|
745 |
-
}
|
746 |
-
|
747 |
-
}
|
748 |
-
|
749 |
-
return string;
|
750 |
-
|
751 |
-
}
|
752 |
-
|
753 |
-
},
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
E_stop: function (j) {
|
760 |
-
|
761 |
-
if (j === this.tID && j !== '') {
|
762 |
-
|
763 |
-
this.clearit();
|
764 |
-
|
765 |
-
if ( jQuery(this.eID.pos + j + ' div.ui-widget-header').length > 0 ) {
|
766 |
-
|
767 |
-
jQuery(this.eID.pos + j).slider('destroy');
|
768 |
-
|
769 |
-
}
|
770 |
-
|
771 |
-
jQuery(this.eID.loader + j).css( "width", '0%' );
|
772 |
-
|
773 |
-
this.button(j, 'play');
|
774 |
-
|
775 |
-
if (this.pl_info[j].type === 'MI') {
|
776 |
-
|
777 |
-
jQuery(this.eID.poscol + j).css( "width", '0%' );
|
778 |
-
|
779 |
-
jQuery(this.eID.tT + j).empty();
|
780 |
-
|
781 |
-
jQuery(this.eID.indiM + j).text('Stopped');
|
782 |
-
|
783 |
-
jQuery(this.eID.pT + j).text(this.Tformat(0));
|
784 |
-
|
785 |
-
} else {
|
786 |
-
|
787 |
-
jQuery(this.eID.indiM + j).empty();
|
788 |
-
|
789 |
-
}
|
790 |
-
|
791 |
-
this.load_pc = 0;
|
792 |
-
|
793 |
-
this.played_t = 0;
|
794 |
-
|
795 |
-
}
|
796 |
-
|
797 |
-
},
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
E_dblstop: function (j) {
|
802 |
-
|
803 |
-
this.listclass(j, this.pl_info[j].tr, 0);
|
804 |
-
|
805 |
-
if ( this.pl_info[j].tr !== 0 ) {
|
806 |
-
|
807 |
-
this.titles(j, 0);
|
808 |
-
|
809 |
-
}
|
810 |
-
|
811 |
-
this.writedownload(j, 0);
|
812 |
-
|
813 |
-
this.E_stop(j);
|
814 |
-
|
815 |
-
jQuery(this.eID.indiM + j).text('Ready');
|
816 |
-
|
817 |
-
this.pl_info[j].tr = 0;
|
818 |
-
|
819 |
-
},
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
E_change_track: function (j, change) {
|
824 |
-
|
825 |
-
var track, txt, p = this.pl_info[j];
|
826 |
-
|
827 |
-
if (j === this.tID && change === p.tr) {
|
828 |
-
|
829 |
-
if ('playing' === this.state) {
|
830 |
-
|
831 |
-
if (this.load_pc === 0) {
|
832 |
-
|
833 |
-
this.E_stop(j);
|
834 |
-
|
835 |
-
} else {
|
836 |
-
|
837 |
-
this.pauseit();
|
838 |
-
|
839 |
-
this.button(j, 'play');
|
840 |
-
|
841 |
-
if ('MI' === p.type) {
|
842 |
-
|
843 |
-
jQuery(this.eID.indiM + j).text('Paused');
|
844 |
-
|
845 |
-
}
|
846 |
-
|
847 |
-
}
|
848 |
-
|
849 |
-
return;
|
850 |
-
|
851 |
-
} else if ('paused' === this.state || 'set' === this.state) {
|
852 |
-
|
853 |
-
this.playit();
|
854 |
-
|
855 |
-
this.button(j, 'pause');
|
856 |
-
|
857 |
-
return;
|
858 |
-
|
859 |
-
}
|
860 |
-
|
861 |
-
}
|
862 |
-
|
863 |
-
this.E_stop(this.tID);
|
864 |
-
|
865 |
-
if ('prev' === change) {
|
866 |
-
|
867 |
-
track = (p.tr-1 < 0) ? p.list.length-1 : p.tr-1;
|
868 |
-
|
869 |
-
} else if ('next' === change) {
|
870 |
-
|
871 |
-
track = (p.tr+1 < p.list.length) ? p.tr+1 : 0;
|
872 |
-
|
873 |
-
} else {
|
874 |
-
|
875 |
-
track = change;
|
876 |
-
|
877 |
-
}
|
878 |
-
|
879 |
-
jQuery(this.jpID).jPlayer("volume", 1 ); //Vol scaling fix
|
880 |
-
|
881 |
-
this.setit(p.list[track].mp3);
|
882 |
-
|
883 |
-
this.playit();
|
884 |
-
|
885 |
-
jQuery(this.jpID).jPlayer("volume", p.vol/100 ); //Reset to correct vol
|
886 |
-
|
887 |
-
txt = ('MI' === p.type) ? '<span class="mp3-finding"></span><span class="mp3-tint"></span>Connecting' : '<span class="Smp3-finding"></span><span class="mp3-gtint"></span>';
|
888 |
-
|
889 |
-
jQuery(this.eID.indiM + j).empty().append(txt);
|
890 |
-
|
891 |
-
this.button(j, 'pause');
|
892 |
-
|
893 |
-
this.makeslider(j);
|
894 |
-
|
895 |
-
if ('MI' === p.type) {
|
896 |
-
|
897 |
-
this.listclass(j, p.tr, track);
|
898 |
-
|
899 |
-
if ( p.tr !== track ) {
|
900 |
-
|
901 |
-
this.titles(j, track);
|
902 |
-
|
903 |
-
}
|
904 |
-
|
905 |
-
if (p.download) {
|
906 |
-
|
907 |
-
this.writedownload(j, track);
|
908 |
-
|
909 |
-
jQuery(this.eID.dload + j).hide().addClass('whilelinks').fadeIn(400);
|
910 |
-
|
911 |
-
}
|
912 |
-
|
913 |
-
}
|
914 |
-
|
915 |
-
p.tr = track;
|
916 |
-
|
917 |
-
this.tID = j;
|
918 |
-
|
919 |
-
},
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
E_launchPP: function (j) {
|
924 |
-
|
925 |
-
var li_height = 28;
|
926 |
-
|
927 |
-
if ( this.pl_info[j].height !== false ) {
|
928 |
-
|
929 |
-
this.vars.pp_playerheight = 100 + this.pl_info[j].height;
|
930 |
-
|
931 |
-
}
|
932 |
-
|
933 |
-
this.vars.pp_windowheight = ( this.pl_info[j].list.length > 1 ) ? this.vars.pp_playerheight + ( this.pl_info[j].list.length * li_height) : this.vars.pp_playerheight;
|
934 |
-
|
935 |
-
if ( this.vars.pp_windowheight > this.vars.pp_maxheight ) {
|
936 |
-
|
937 |
-
this.vars.pp_windowheight = this.vars.pp_maxheight;
|
938 |
-
|
939 |
-
}
|
940 |
-
|
941 |
-
this.launched_ID = j;
|
942 |
-
|
943 |
-
this.was_playing = ( this.state === "playing" ) ? true : false;
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
this.E_stop(this.tID);
|
948 |
-
|
949 |
-
this.setit(this.plugin_path + '/mp3/silence.mp3');
|
950 |
-
|
951 |
-
this.playit(); //make chrome let go of last track (incase it didn't finish loading)
|
952 |
-
|
953 |
-
this.clearit();
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
var newwindow = window.open(this.plugin_path + '/popout.php', 'mp3jpopout', 'height=300, width=600, location=1, status=1, scrollbars=1, resizable=1, left=25, top=25');
|
958 |
-
|
959 |
-
if ( this.pl_info[j].lstate === true ) {
|
960 |
-
|
961 |
-
newwindow.resizeTo( this.vars.pp_width, this.vars.pp_windowheight );
|
962 |
-
|
963 |
-
} else {
|
964 |
-
|
965 |
-
newwindow.resizeTo( this.vars.pp_width, this.vars.pp_playerheight );
|
966 |
-
|
967 |
-
}
|
968 |
-
|
969 |
-
if (window.focus) {
|
970 |
-
|
971 |
-
newwindow.focus();
|
972 |
-
|
973 |
-
}
|
974 |
-
|
975 |
-
return false;
|
976 |
-
|
977 |
-
},
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
setit: function (file) {
|
982 |
-
|
983 |
-
this.state = 'set';
|
984 |
-
|
985 |
-
jQuery(this.jpID).jPlayer("setMedia", {mp3: file});
|
986 |
-
|
987 |
-
},
|
988 |
-
|
989 |
-
playit: function () {
|
990 |
-
|
991 |
-
this.state = 'playing';
|
992 |
-
|
993 |
-
jQuery(this.jpID).jPlayer("play");
|
994 |
-
|
995 |
-
},
|
996 |
-
|
997 |
-
pauseit: function () {
|
998 |
-
|
999 |
-
this.state = 'paused';
|
1000 |
-
|
1001 |
-
jQuery(this.jpID).jPlayer("pause");
|
1002 |
-
|
1003 |
-
},
|
1004 |
-
|
1005 |
-
clearit: function () {
|
1006 |
-
|
1007 |
-
this.state = '';
|
1008 |
-
|
1009 |
-
jQuery(this.jpID).jPlayer("clearMedia");
|
1010 |
-
|
1011 |
-
},
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
button: function (j, type) {
|
1016 |
-
|
1017 |
-
if (j === '') { return; }
|
1018 |
-
|
1019 |
-
if ('pause' === type) {
|
1020 |
-
|
1021 |
-
if (this.pl_info[j].play_txt === '#USE_G#') {
|
1022 |
-
|
1023 |
-
jQuery(this.eID.play + j).removeClass('buttons_mp3j').addClass('buttons_mp3jpause');
|
1024 |
-
|
1025 |
-
} else {
|
1026 |
-
|
1027 |
-
jQuery(this.eID.play + j).text(this.pl_info[j].pause_txt);
|
1028 |
-
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
}
|
1032 |
-
|
1033 |
-
if ('play' === type) {
|
1034 |
-
|
1035 |
-
if (this.pl_info[j].play_txt === '#USE_G#') {
|
1036 |
-
|
1037 |
-
jQuery(this.eID.play + j).removeClass('buttons_mp3jpause').addClass('buttons_mp3j');
|
1038 |
-
|
1039 |
-
} else {
|
1040 |
-
|
1041 |
-
jQuery(this.eID.play + j).text(this.pl_info[j].play_txt);
|
1042 |
-
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
},
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
listclass: function ( j, rem, add ) {
|
1052 |
-
|
1053 |
-
jQuery('#'+ this.eID.a + j +'_'+ rem).removeClass('mp3j_A_current');
|
1054 |
-
|
1055 |
-
jQuery('#'+ this.eID.a + j +'_'+ add).addClass('mp3j_A_current');
|
1056 |
-
|
1057 |
-
},
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
titles: function ( j, track ) {
|
1062 |
-
|
1063 |
-
var p = this.pl_info[j], Olink = '', Clink = '';
|
1064 |
-
|
1065 |
-
if (p.type === "MI") {
|
1066 |
-
|
1067 |
-
jQuery(this.eID.title + j).empty().append(p.list[track].name).append('<br /><span>' + p.list[track].artist + '</span>');
|
1068 |
-
|
1069 |
-
if (p.list[track].image !== '') {
|
1070 |
-
|
1071 |
-
if (p.list[track].imgurl !== '') {
|
1072 |
-
|
1073 |
-
Olink = '<a href="' + p.list[track].imgurl + '">';
|
1074 |
-
|
1075 |
-
Clink = '</a>';
|
1076 |
-
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
jQuery(this.eID.img + j).empty().hide().append(Olink + '<img src="' + p.list[track].image + '" />' + Clink).fadeIn(300);
|
1080 |
-
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
}
|
1084 |
-
|
1085 |
-
},
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
writedownload: function ( j, track ) {
|
1090 |
-
|
1091 |
-
var p = this.pl_info[j];
|
1092 |
-
|
1093 |
-
if (p.download) {
|
1094 |
-
|
1095 |
-
jQuery(this.eID.dload + j).empty().removeClass('whilelinks').append('<a id="mp3j_dlanchor_' + j + '" href="' + p.list[track].mp3 + '" target="_blank">' + this.vars.dload_text + '</a>');
|
1096 |
-
|
1097 |
-
if ( this.vars.force_dload === true ) {
|
1098 |
-
|
1099 |
-
this.dl_button_click( j );
|
1100 |
-
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
}
|
1104 |
-
|
1105 |
-
},
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
togglelist: function ( j ) {
|
1110 |
-
|
1111 |
-
if (this.pl_info[j].lstate === true) {
|
1112 |
-
|
1113 |
-
jQuery(this.eID.plwrap + j).fadeOut(300);
|
1114 |
-
|
1115 |
-
jQuery(this.eID.toglist + j).text('SHOW');
|
1116 |
-
|
1117 |
-
this.pl_info[j].lstate = false;
|
1118 |
-
|
1119 |
-
} else if (this.pl_info[j].lstate === false) {
|
1120 |
-
|
1121 |
-
jQuery(this.eID.plwrap + j).fadeIn("slow");
|
1122 |
-
|
1123 |
-
jQuery(this.eID.toglist + j).text('HIDE');
|
1124 |
-
|
1125 |
-
this.pl_info[j].lstate = true;
|
1126 |
-
|
1127 |
-
}
|
1128 |
-
|
1129 |
-
},
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
makeslider: function (j) {
|
1134 |
-
|
1135 |
-
var phmove, cssmove, that = this;
|
1136 |
-
|
1137 |
-
jQuery(this.eID.pos + j).css( 'visibility', 'hidden' );
|
1138 |
-
|
1139 |
-
jQuery(this.eID.pos + j).slider({
|
1140 |
-
|
1141 |
-
max: 1000,
|
1142 |
-
|
1143 |
-
range: 'min',
|
1144 |
-
|
1145 |
-
animate: false,
|
1146 |
-
|
1147 |
-
slide: function (event, ui) {
|
1148 |
-
|
1149 |
-
if ((ui.value/10) < that.load_pc) {
|
1150 |
-
|
1151 |
-
cssmove = ui.value/10;
|
1152 |
-
|
1153 |
-
phmove = ui.value*(10.0/that.jp_seekable);
|
1154 |
-
|
1155 |
-
} else {
|
1156 |
-
|
1157 |
-
cssmove = 0.99*that.load_pc;
|
1158 |
-
|
1159 |
-
phmove = (9.9*that.load_pc)*(10.0/that.jp_seekable);
|
1160 |
-
|
1161 |
-
}
|
1162 |
-
|
1163 |
-
jQuery(that.eID.poscol + j).css('width', cssmove + '%');
|
1164 |
-
|
1165 |
-
jQuery(that.jpID).jPlayer("playHead", phmove );
|
1166 |
-
|
1167 |
-
if (that.state === 'paused') {
|
1168 |
-
|
1169 |
-
that.button(j, 'pause');
|
1170 |
-
|
1171 |
-
that.playit();
|
1172 |
-
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
that.state = 'playing';
|
1176 |
-
|
1177 |
-
that.sliding = true;
|
1178 |
-
|
1179 |
-
}
|
1180 |
-
|
1181 |
-
});
|
1182 |
-
|
1183 |
-
}
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
};
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
// Force browser download
|
1192 |
-
|
1193 |
-
MP3_JPLAYER.dl_button_click = function ( j ) {
|
1194 |
-
|
1195 |
-
var that = this, p = this.pl_info[j];
|
1196 |
-
|
1197 |
-
jQuery('#mp3j_dlanchor_' + j).click(function (e) {
|
1198 |
-
|
1199 |
-
that.dl_runinfo( p.list[p.tr].mp3, j, e );
|
1200 |
-
|
1201 |
-
e.preventDefault();
|
1202 |
-
|
1203 |
-
});
|
1204 |
-
|
1205 |
-
};
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
MP3_JPLAYER.dl_closeinfo_click = function ( j ) {
|
1210 |
-
|
1211 |
-
var that = this;
|
1212 |
-
|
1213 |
-
jQuery('#mp3j_finfo_close_' + j).click(function () {
|
1214 |
-
|
1215 |
-
that.dl_dialogue( j, '', 'close');
|
1216 |
-
|
1217 |
-
that.clear_timers( j );
|
1218 |
-
|
1219 |
-
});
|
1220 |
-
|
1221 |
-
};
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
MP3_JPLAYER.dl_runinfo = function ( get, j, e ) {
|
1226 |
-
|
1227 |
-
var can_write,
|
1228 |
-
|
1229 |
-
dlpath,
|
1230 |
-
|
1231 |
-
message,
|
1232 |
-
|
1233 |
-
that = this,
|
1234 |
-
|
1235 |
-
dlframe = false,
|
1236 |
-
|
1237 |
-
p = this.pl_info[j],
|
1238 |
-
|
1239 |
-
is_local = this.is_local_dload( get );
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
var enc_get;
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
if ( !this.intervalIDs[ j ] && !this.timeoutIDs[ j ] ) { //if timers not already running for this player
|
1248 |
-
|
1249 |
-
can_write = this.write_cookie('mp3Download' + j, 'waiting', '');
|
1250 |
-
|
1251 |
-
if ( is_local ) {
|
1252 |
-
|
1253 |
-
if ( can_write !== false ) {
|
1254 |
-
|
1255 |
-
this.dl_dialogue( j, this.vars.message_interval, 'check');
|
1256 |
-
|
1257 |
-
} else {
|
1258 |
-
|
1259 |
-
this.dl_dialogue( j, this.vars.message_indark, 'indark');
|
1260 |
-
|
1261 |
-
}
|
1262 |
-
|
1263 |
-
this.intervalIDs[ j ] = setInterval( function(){ that.dl_interval_check( j, can_write ); }, 500);
|
1264 |
-
|
1265 |
-
this.timeoutIDs[ j ] = setTimeout( function(){ that.dl_timeout( j, can_write ); }, 7000);
|
1266 |
-
|
1267 |
-
dlframe = true;
|
1268 |
-
|
1269 |
-
} else {
|
1270 |
-
|
1271 |
-
if ( this.vars.dl_remote_path === '' ) {
|
1272 |
-
|
1273 |
-
message = this.vars.message_promtlink.replace('#1', get);
|
1274 |
-
|
1275 |
-
message = message.replace('#2', p.list[p.tr].name);
|
1276 |
-
|
1277 |
-
this.dl_dialogue( j, message, 'indark');
|
1278 |
-
|
1279 |
-
} else {
|
1280 |
-
|
1281 |
-
message = this.vars.message_indark.replace('#1', get);
|
1282 |
-
|
1283 |
-
message = message.replace('#2', p.list[p.tr].name);
|
1284 |
-
|
1285 |
-
this.dl_dialogue( j, message, 'indark');
|
1286 |
-
|
1287 |
-
dlframe = true;
|
1288 |
-
|
1289 |
-
}
|
1290 |
-
|
1291 |
-
}
|
1292 |
-
|
1293 |
-
this.dl_dialogs[ j ] = 'false';
|
1294 |
-
|
1295 |
-
if ( dlframe ) {
|
1296 |
-
|
1297 |
-
dlpath = this.get_dloader_path( get );
|
1298 |
-
|
1299 |
-
enc_get = encodeURIComponent( get );
|
1300 |
-
|
1301 |
-
//jQuery('#mp3j_dlf_' + j).empty().append('<iframe id="mp3j_dlframe_' + j + '" name="mp3j_dlframe_' + j + '" class="mp3j-dlframe" src="' + dlpath + '?mp3=loc' + get + '&pID=' + j + '" style="display:none;"></iframe>');
|
1302 |
-
|
1303 |
-
jQuery('#mp3j_dlf_' + j).empty().append('<iframe id="mp3j_dlframe_' + j + '" name="mp3j_dlframe_' + j + '" class="mp3j-dlframe" src="' + dlpath + '?mp3=loc' + enc_get + '&pID=' + j + '" style="display:none;"></iframe>');
|
1304 |
-
|
1305 |
-
}
|
1306 |
-
|
1307 |
-
}
|
1308 |
-
|
1309 |
-
};
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
MP3_JPLAYER.dl_interval_check = function ( j, can_write ) {
|
1314 |
-
|
1315 |
-
if ( can_write !== false && this.read_cookie('mp3Download' + j) === 'true' ) { //got cookie back, all should be good
|
1316 |
-
|
1317 |
-
this.dl_dialogue( j, this.vars.message_ok, 'hide');
|
1318 |
-
|
1319 |
-
//jQuery('#debug').append('<br />check: cookie '+j+' true');
|
1320 |
-
|
1321 |
-
this.clear_timers( j );
|
1322 |
-
|
1323 |
-
} else if ( this.dl_dialogs[ j ] !== 'false' ) { //got a message back
|
1324 |
-
|
1325 |
-
this.dl_dialogue( j, this.dl_dialogs[ j ], 'add');
|
1326 |
-
|
1327 |
-
//jQuery('#debug').append('<br />check: dialog'+j+' true');
|
1328 |
-
|
1329 |
-
this.clear_timers( j );
|
1330 |
-
|
1331 |
-
} //else {
|
1332 |
-
|
1333 |
-
//jQuery('#debug').append('<br />check: neither '+j+'...# ');
|
1334 |
-
|
1335 |
-
//}
|
1336 |
-
|
1337 |
-
};
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
MP3_JPLAYER.dl_timeout = function ( j, can_write ) {
|
1342 |
-
|
1343 |
-
this.clear_timers( j );
|
1344 |
-
|
1345 |
-
if ( can_write !== false ) {
|
1346 |
-
|
1347 |
-
this.dl_dialogue( j, this.vars.message_timeout, 'add');
|
1348 |
-
|
1349 |
-
}
|
1350 |
-
|
1351 |
-
//jQuery('#debug').append('<br />no responses ('+j+' timed out) ');
|
1352 |
-
|
1353 |
-
};
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
MP3_JPLAYER.clear_timers = function ( j ) {
|
1358 |
-
|
1359 |
-
if ( this.intervalIDs[ j ] !== null && this.timeoutIDs[ j ] !== null ) {
|
1360 |
-
|
1361 |
-
clearInterval( this.intervalIDs[j] );
|
1362 |
-
|
1363 |
-
clearTimeout( this.timeoutIDs[j] );
|
1364 |
-
|
1365 |
-
this.intervalIDs[ j ] = null;
|
1366 |
-
|
1367 |
-
this.timeoutIDs[j] = null;
|
1368 |
-
|
1369 |
-
}
|
1370 |
-
|
1371 |
-
jQuery('#mp3j_dlf_' + j).empty(); //ditch iframe
|
1372 |
-
|
1373 |
-
this.write_cookie('mp3Download' + j, '', -1); //clear any cookie
|
1374 |
-
|
1375 |
-
//jQuery('#debug').append('<br />cookie/frame '+j+' cleared');
|
1376 |
-
|
1377 |
-
};
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
MP3_JPLAYER.dl_dialogue = function ( j, text, state ) {
|
1382 |
-
|
1383 |
-
if ( 'check' === state ) {
|
1384 |
-
|
1385 |
-
jQuery('#mp3j_finfo_gif_' + j).show();
|
1386 |
-
|
1387 |
-
jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
|
1388 |
-
|
1389 |
-
jQuery('#mp3j_finfo_' + j).show();
|
1390 |
-
|
1391 |
-
} else if ( 'add' === state ) {
|
1392 |
-
|
1393 |
-
jQuery('#mp3j_finfo_gif_' + j).hide();
|
1394 |
-
|
1395 |
-
jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
|
1396 |
-
|
1397 |
-
} else if ( 'indark' === state ) {
|
1398 |
-
|
1399 |
-
jQuery('#mp3j_finfo_gif_' + j).hide();
|
1400 |
-
|
1401 |
-
jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
|
1402 |
-
|
1403 |
-
jQuery('#mp3j_finfo_' + j).fadeIn(100);
|
1404 |
-
|
1405 |
-
} else if ( 'close' === state ) {
|
1406 |
-
|
1407 |
-
jQuery('#mp3j_finfo_gif_' + j).hide();
|
1408 |
-
|
1409 |
-
jQuery('#mp3j_finfo_' + j).hide();
|
1410 |
-
|
1411 |
-
} else {
|
1412 |
-
|
1413 |
-
jQuery('#mp3j_finfo_gif_' + j).hide();
|
1414 |
-
|
1415 |
-
if ( text !== '' ) {
|
1416 |
-
|
1417 |
-
jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
|
1418 |
-
|
1419 |
-
}
|
1420 |
-
|
1421 |
-
jQuery('#mp3j_finfo_' + j).fadeOut(1000);
|
1422 |
-
|
1423 |
-
}
|
1424 |
-
|
1425 |
-
};
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
MP3_JPLAYER.read_cookie = function ( name ) {
|
1430 |
-
|
1431 |
-
var i, cookie, allCookies = document.cookie.split('; ');
|
1432 |
-
|
1433 |
-
if ( allCookies.length > 0 ) {
|
1434 |
-
|
1435 |
-
for ( i = 0; i < allCookies.length; i += 1 ) {
|
1436 |
-
|
1437 |
-
cookie = allCookies[i].split( '=' );
|
1438 |
-
|
1439 |
-
if ( cookie[0] === name ) {
|
1440 |
-
|
1441 |
-
return cookie[1];
|
1442 |
-
|
1443 |
-
}
|
1444 |
-
|
1445 |
-
}
|
1446 |
-
|
1447 |
-
}
|
1448 |
-
|
1449 |
-
return false;
|
1450 |
-
|
1451 |
-
};
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
MP3_JPLAYER.write_cookie = function ( name, value, days ) {
|
1456 |
-
|
1457 |
-
var date, expires = "";
|
1458 |
-
|
1459 |
-
if ( days ) {
|
1460 |
-
|
1461 |
-
date = new Date();
|
1462 |
-
|
1463 |
-
date.setTime( date.getTime() + (days*24*60*60*1000) );
|
1464 |
-
|
1465 |
-
expires = "; expires=" + date.toGMTString();
|
1466 |
-
|
1467 |
-
}
|
1468 |
-
|
1469 |
-
document.cookie = name + "=" + value + expires + "; path=/";
|
1470 |
-
|
1471 |
-
return this.read_cookie( name );
|
1472 |
-
|
1473 |
-
};
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
MP3_JPLAYER.get_dloader_path = function ( loc ) {
|
1478 |
-
|
1479 |
-
var k, path = "", file = "", chunks;
|
1480 |
-
|
1481 |
-
chunks = loc.split('/');
|
1482 |
-
|
1483 |
-
file = chunks[chunks.length-1];
|
1484 |
-
|
1485 |
-
//jQuery('#debug').append('<br />');
|
1486 |
-
|
1487 |
-
//for ( k = 0; k < chunks.length; k += 1 ) {
|
1488 |
-
|
1489 |
-
// jQuery('#debug').append('<br />[' + k + '] ' + chunks[k]);
|
1490 |
-
|
1491 |
-
//}
|
1492 |
-
|
1493 |
-
//jQuery('#debug').append('<br />file:' + file);
|
1494 |
-
|
1495 |
-
if ( loc.charAt(0) === '/' ) {
|
1496 |
-
|
1497 |
-
path = this.plugin_path + '/download.php';
|
1498 |
-
|
1499 |
-
} else {
|
1500 |
-
|
1501 |
-
path = chunks[2].replace(/^www./i, "");
|
1502 |
-
|
1503 |
-
if ( path === this.dl_domain ) {
|
1504 |
-
|
1505 |
-
path = this.plugin_path + '/download.php';
|
1506 |
-
|
1507 |
-
} else {
|
1508 |
-
|
1509 |
-
path = chunks[0] + '//' + chunks[2] + this.vars.dl_remote_path;
|
1510 |
-
|
1511 |
-
}
|
1512 |
-
|
1513 |
-
}
|
1514 |
-
|
1515 |
-
//jQuery('#debug').append('<br />path:' + path);
|
1516 |
-
|
1517 |
-
return path;
|
1518 |
-
|
1519 |
-
};
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
MP3_JPLAYER.is_local_dload = function ( loc ) {
|
1524 |
-
|
1525 |
-
var domain = "", file = "", chunks, is_local = false;
|
1526 |
-
|
1527 |
-
chunks = loc.split('/');
|
1528 |
-
|
1529 |
-
file = chunks[chunks.length-1];
|
1530 |
-
|
1531 |
-
if ( loc.charAt(0) === '/' ) {
|
1532 |
-
|
1533 |
-
is_local = true;
|
1534 |
-
|
1535 |
-
} else {
|
1536 |
-
|
1537 |
-
domain = chunks[2].replace(/^www./i, "");
|
1538 |
-
|
1539 |
-
if ( domain === this.dl_domain ) {
|
1540 |
-
|
1541 |
-
is_local = true;
|
1542 |
-
|
1543 |
-
}
|
1544 |
-
|
1545 |
-
}
|
1546 |
-
|
1547 |
-
return is_local;
|
1548 |
-
|
1549 |
-
};
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/mp3-jplayer-1.8.9.js
CHANGED
@@ -13,6 +13,7 @@ var MP3_JPLAYER = {
|
|
13 |
dl_dialogs: [],
|
14 |
timeoutIDs: [],
|
15 |
intervalIDs: [],
|
|
|
16 |
dl_domain: '',
|
17 |
jp_audio: {},
|
18 |
jp_seekable: 0,
|
@@ -20,6 +21,8 @@ var MP3_JPLAYER = {
|
|
20 |
launched_ID: null,
|
21 |
jpID: '#mp3_jplayer_1_8',
|
22 |
plugin_path: '',
|
|
|
|
|
23 |
|
24 |
vars: {
|
25 |
play_f: false,
|
@@ -75,6 +78,8 @@ var MP3_JPLAYER = {
|
|
75 |
|
76 |
this.unwrap();
|
77 |
this.write_controls();
|
|
|
|
|
78 |
jQuery(this.jpID).jPlayer({
|
79 |
ready: function () {
|
80 |
that.startup();
|
@@ -111,6 +116,32 @@ var MP3_JPLAYER = {
|
|
111 |
});
|
112 |
},
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
get_loaded: function (event) {
|
115 |
var lp;
|
116 |
if ( typeof this.jp_audio.buffered === "object" ) {
|
13 |
dl_dialogs: [],
|
14 |
timeoutIDs: [],
|
15 |
intervalIDs: [],
|
16 |
+
jperrorIDs: [],
|
17 |
dl_domain: '',
|
18 |
jp_audio: {},
|
19 |
jp_seekable: 0,
|
21 |
launched_ID: null,
|
22 |
jpID: '#mp3_jplayer_1_8',
|
23 |
plugin_path: '',
|
24 |
+
lastformats: '',
|
25 |
+
was_playing: false,
|
26 |
|
27 |
vars: {
|
28 |
play_f: false,
|
78 |
|
79 |
this.unwrap();
|
80 |
this.write_controls();
|
81 |
+
this.add_jpconstruct_div();
|
82 |
+
|
83 |
jQuery(this.jpID).jPlayer({
|
84 |
ready: function () {
|
85 |
that.startup();
|
116 |
});
|
117 |
},
|
118 |
|
119 |
+
|
120 |
+
////
|
121 |
+
////
|
122 |
+
check_show_jperrors: function ( event ) {
|
123 |
+
if ( this.tID !== '' && this.jperrorIDs[ this.tID ] !== true ) {
|
124 |
+
if ( event.jPlayer.error.type === 'e_no_solution' || event.jPlayer.error.type === 'e_no_support' ) {
|
125 |
+
this.show_nosolution( this.tID );
|
126 |
+
this.jperrorIDs[ this.tID ] = true;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
},
|
130 |
+
|
131 |
+
show_nosolution: function ( j ) {
|
132 |
+
jQuery('#mp3j_nosolution_' + j).empty().append(this.vars.message_nosolution).fadeIn(200);
|
133 |
+
},
|
134 |
+
|
135 |
+
add_jpconstruct_div: function () {
|
136 |
+
var html = '<div id="mp3_jplayer_items" style="position:relative; overflow:hidden; margin:0; padding:0; border:0; width:0px; height:0px;"><div id="mp3_jplayer_1_8" style="left:-999em;"></div></div>';
|
137 |
+
jQuery('body').prepend( html );
|
138 |
+
},
|
139 |
+
|
140 |
+
////
|
141 |
+
////
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
get_loaded: function (event) {
|
146 |
var lp;
|
147 |
if ( typeof this.jp_audio.buffered === "object" ) {
|
mp3j_admin.php
CHANGED
@@ -5,6 +5,8 @@
|
|
5 |
$O = $mp3_fox->getAdminOptions();
|
6 |
$colours_array = array();
|
7 |
|
|
|
|
|
8 |
if ( isset( $_POST['update_mp3foxSettings'] ) )
|
9 |
{
|
10 |
|
@@ -157,213 +159,323 @@
|
|
157 |
?>
|
158 |
|
159 |
<div class="wrap">
|
|
|
160 |
<h2> </h2>
|
161 |
-
<h1>MP3
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
167 |
|
168 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
-
<p>
|
|
|
|
|
|
|
|
|
171 |
|
172 |
<br />
|
173 |
-
<
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
-
<
|
203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
|
205 |
-
<
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
<code>volslider</code> <span class="description">y/n</span><br />
|
210 |
-
<code>autoplay</code> <span class="description">y/n</span><br />
|
211 |
-
<code>loop</code> <span class="description">y/n</span><br />
|
212 |
-
<code>title</code> <span class="description">text (replaces both title and caption)</span><br />
|
213 |
-
<code>bold</code> <span class="description">y/n</span><br />
|
214 |
-
<code>flip</code> <span class="description">y/n (play/pause)</span><br />
|
215 |
-
<code>ind</code> <span class="description">y/n (hide indicator and time)</span><br />
|
216 |
-
<code>flow</code> <span class="description">y/n (don't line break)</span><br />
|
217 |
-
<code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
|
218 |
|
219 |
-
|
220 |
-
|
221 |
|
222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
-
<div
|
225 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
|
227 |
-
<
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
<code>list</code> <span class="description">y/n (show popout playlist)</span><br />
|
235 |
-
<code>pick</code> <span class="description">number (pick random selection)</span><br />
|
236 |
-
<code>shuffle</code> <span class="description">y/n (shuffle track order)</span><br />
|
237 |
-
<code>title</code> <span class="description">title for the popout window</span><br />
|
238 |
-
<code>pos</code> <span class="description">rel-L, rel-C, rel-R, left, right (link position)</span><br />
|
239 |
-
<code>text</code> <span class="description">text for the link</span><br />
|
240 |
-
<code>height</code> <span class="description">px (popout player height excluding it's list)</span><br />
|
241 |
-
<code>id</code> <span class="description">a page id (to read the custom fields from)</span><br />
|
242 |
-
<code>tag</code> <span class="description">html tag for text (eg. <code>h2</code>, Default is <code>p</code>)</span><br />
|
243 |
-
<code>image</code> <span class="description">image for the popout link</span><br />
|
244 |
-
<code>images</code> <span class="description">comma separated list of track image urls</span><br />
|
245 |
-
<!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
|
246 |
-
<code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
|
247 |
-
<code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
|
248 |
</div>
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
|
257 |
-
<
|
|
|
|
|
|
|
258 |
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
<
|
265 |
-
<br />
|
266 |
|
267 |
-
|
268 |
-
<p><code>FEED:LIB</code> playlists all mp3s in the library.<br />
|
269 |
-
<code>FEED:DF</code> playlists your default folder.<br />
|
270 |
-
<code>FEED:/my/music</code> playlists a folder or subfolder (relative to root of domain, not the WP install)</p>
|
271 |
-
<p><strong>Eg</strong>. Play 5 random tracks from the library: <code>[mp3-jplayer tracks="FEED:LIB" pick="5"]</code><br />
|
272 |
-
<strong>Eg</strong>. Play everything in the folder called 'tunes': <code>[mp3-jplayer tracks="FEED:/tunes"]</code></p>
|
273 |
-
|
274 |
-
<p>The <code>tracks</code> parameter can contain a mix of FEEDs and filenames/urls, eg. <code>[mp3-jplayer tracks="myfileA.mp3, FEED:/tunes, Title@myfileB.mp3, FEED:DF"]</code>.
|
275 |
-
When just a filename is used the file must be in either your media library or in the default folder (set on this page). You can also specify a file in a sub
|
276 |
-
directory in the default folder eg. <code>tracks="subfolder/file.mp3"</code>.</p>
|
277 |
|
278 |
-
<
|
279 |
-
|
280 |
-
<h3 style="margin-left:0;">Custom Fields</h3>
|
281 |
-
<p>You can write playlists into the custom fields that are on page and post edit screens (check your 'screen options' at top-right
|
282 |
-
if they're not visible). They can be picked up with any of the shortcodes (from any page/post, or with the template tag, or by the widgets). See below for how
|
283 |
-
to set them up and some example uses:</p>
|
284 |
-
|
285 |
-
<p class="description">1. Enter <code>mp3</code> into the left hand box (the 'key' box).<br />2. Write the filename, URI, or 'FEED' (see above) into the right hand box (the 'value' box) and hit 'add custom field'</p>
|
286 |
-
<p>Add each track or 'FEED' in a new field pair.</p>
|
287 |
-
<p>To add titles and captions in the custom fields use the following format:</p>
|
288 |
-
<p class="description">1. Add a dot, then the caption in the left hand box, eg: <code>mp3.My Caption</code>
|
289 |
-
<br />2. Add the title, then an '@' before the filename in the right box, eg: <code>My Title@filename</code></p>
|
290 |
-
<p>The keys (left boxes) can be numbered, eg:<code>1 mp3</code> will be first on the playlist.</p>
|
291 |
-
|
292 |
-
<p><strong>Eg</strong>. If a custom field key / value pair is set as <code>mp3</code> / <code>FEED:LIB</code>, then the library is available to any shortcodes, so:<br />
|
293 |
-
|
294 |
-
<code>[mp3j]</code> or <code>[mp3t]</code> <span class="description">plays the next track from the library in a single player</span> <br />
|
295 |
-
<code>[mp3j track="3"]</code> or <code>[mp3t track="3"]</code> <span class="description">plays track 3 from the library in a single player</span> <br />
|
296 |
-
<code>[mp3-jplayer]</code> <span class="description">playlists all the custom fields in a playlist player</span><br /></p>
|
297 |
|
298 |
-
<
|
|
|
|
|
|
|
299 |
|
300 |
|
301 |
-
<
|
302 |
-
<p class="description">
|
303 |
-
|
304 |
-
MP3j-ui - <span class="description">Adds a playlist player by using tick boxes and modes. Note that some features such as manually written captions, and additional style (css classes) cannot be set with this widget, use the mp3j-sh widget instead.</span>
|
305 |
-
</p>
|
306 |
-
<br />
|
307 |
-
<h3 style="margin-left:0;">Template Tags</h3>
|
308 |
-
<p class="description">For use in theme files, See <a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a> for more details.</p>
|
309 |
-
<p style="line-height:22px;"><code style="font-size:13px;">mp3j_addscripts( $style )</code><br /><code style="font-size:13px;">mp3j_put( $shortcodes )</code><br /><code style="font-size:13px;">mp3j_grab_library( $format )</code><br/><code style="font-size:13px;">mp3j_debug()</code></p>
|
310 |
-
|
311 |
-
<br />
|
312 |
|
313 |
-
<h3 style="margin-left:0;">Testing</h3>
|
314 |
-
<p><strong>Make sure you're using default plugin settings for these tests.</strong></p>
|
315 |
-
<p>You can test the plugin with a valid mp3 by copy/pasting the following shortcode into a page or post:<br />
|
316 |
-
<code>[mp3-jplayer tracks="http://sjward.org/seven.mp3"]</code></p>
|
317 |
-
|
318 |
-
<p>To test link replacement copy/paste one of these links, if you're not sure which one then paste them both (one of them should work):</p>
|
319 |
-
<p>If you use the visual (default) editor: <code><a href="http://sjward.org/seven.mp3">Test link</a></code><br />
|
320 |
-
If you use the text editor: <code><a href="http://sjward.org/seven.mp3">Test link</a></code></p>
|
321 |
-
|
322 |
-
<p><br />Links to info:<br /><a href="http://sjward.org/jplayer-for-wordpress">Demo page</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Style Parameter Help</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/remote/help.txt">Forcing Remote Downloads</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a></p>
|
323 |
-
<br /><br />
|
324 |
-
|
325 |
-
</div>
|
326 |
-
|
327 |
-
<form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
|
328 |
-
<p class="jtext">Initial volume <input type="text" style="text-align:center;" size="2" name="mp3foxVol" value="<?php echo $O['initial_vol']; ?>" /> <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 ); }?> /> 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 ); }?> /> 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 ); }?> /> 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 |
-
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 ); }?> /> Show players in posts on index, archive, and search pages <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 ); }?> /> Run shortcodes in post excerpts <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>
|
356 |
-
<span id="player-csssheet" style=" <?php echo $greyout_text; ?>"> 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>
|
364 |
-
|
365 |
-
<div id="tog_1-list" style="position:relative; margin:0px 0px 15px 20px; width:579px;">
|
366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
<div style="position:relative; width:579px; height:20px; padding-top:2px; border-top:1px solid #eee; border-bottom:1px solid #eee; background:#f9f9f9;">
|
368 |
<div style="float:left; width:90px; margin-left:9px;"><p class="description" style="margin:0px;"><strong>AREA</strong></p></div>
|
369 |
<div style="float:left; width:390px;"><p class="description" style="margin:0px;"> Opacity Colour</p></div>
|
@@ -496,253 +608,81 @@
|
|
496 |
<br clear="all" />
|
497 |
</div>
|
498 |
<p class="description" style="margin-top: 30px; margin-bottom: 0px;"> (Opacity values from 0 to 100, leave any fields blank to use the default setting)</p>
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
<h3>Media Library</h3>
|
504 |
-
<?php
|
505 |
-
// create library file list //
|
506 |
-
$library = $mp3_fox->grab_library_info();
|
507 |
-
$L_count = ( $library ) ? $library['count'] : "0";
|
508 |
-
echo "<p class=\"description\" style=\"margin:0 0 2px 35px;\">Library contains <strong>" . $L_count . "</strong> mp3";
|
509 |
-
if ( $library['count'] != 1 ) { echo "'s "; }
|
510 |
-
else { echo " "; }
|
511 |
-
|
512 |
-
if ( $L_count > 0 ) {
|
513 |
-
//echo "<a href=\"javascript:mp3jp_listtoggle('fox_library','files');\" id=\"fox_library-toggle\">Show files</a> | <a href=\"media-new.php\">Upload new</a>";
|
514 |
-
echo "<a href=\"javascript:MP3J_ADMIN.showhideit('fox_library','files');\" id=\"fox_library-toggle\">Show files</a> | <a href=\"media-new.php\">Upload new</a>";
|
515 |
-
echo "</p>";
|
516 |
-
//echo "<div id=\"fox_library-list\" style=\"display:none;\">\n";
|
517 |
-
echo "<div id=\"fox_library-list\">\n";
|
518 |
-
$liblist = '<p style="margin-left:0px;">';
|
519 |
-
$br = '<br />';
|
520 |
-
$tagclose = '</p>';
|
521 |
-
$n = 1;
|
522 |
-
foreach ( $library['filenames'] as $i => $file ) {
|
523 |
-
//$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " </span> " . $file . " <span style=\"color:#aaa;font-size:11px;\">\"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span>" . $br;
|
524 |
-
switch( $O['library_sortcol'] ) {
|
525 |
-
case "title":
|
526 |
-
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " \"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span> " . $file . $br;
|
527 |
-
break;
|
528 |
-
case "caption":
|
529 |
-
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " " . $library['excerpts'][$i] . " \"" . $library['titles'][$i] . "\"</span> " . $file . $br;
|
530 |
-
break;
|
531 |
-
default:
|
532 |
-
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . "</span> " . $file . " <span style=\"color:#aaa;font-size:11px;\">\"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span>" . $br;
|
533 |
-
}
|
534 |
-
}
|
535 |
-
$liblist .= $tagclose;
|
536 |
-
echo $liblist;
|
537 |
-
echo '</div>';
|
538 |
-
}
|
539 |
-
else { echo "<a href=\"media-new.php\">Upload new</a></p>"; }
|
540 |
-
?>
|
541 |
-
|
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:
|
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 |
-
Direction:
|
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: <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, "/" );
|
569 |
-
$files[$i] = str_replace( "/", "", $files[$i] );
|
570 |
-
}
|
571 |
-
$c = (!empty($files)) ? count($files) : 0;
|
572 |
-
echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">This folder contains <strong>" . $c . "</strong> mp3";
|
573 |
-
if ( $c != 1 ) { echo "'s "; }
|
574 |
-
else { echo " "; }
|
575 |
-
if ( $c > 0 ) {
|
576 |
-
//echo "<a href=\"javascript:mp3jp_listtoggle('fox_folder','files');\" id=\"fox_folder-toggle\">Show files</a></p>";
|
577 |
-
echo "<a href=\"javascript:MP3J_ADMIN.showhideit('fox_folder','files');\" id=\"fox_folder-toggle\">Show files</a></p>";
|
578 |
-
//echo "<div id=\"fox_folder-list\" style=\"display:none;\">\n<p style=\"margin-left:0px;\">";
|
579 |
-
echo "<div id=\"fox_folder-list\">\n<p style=\"margin-left:0px;\">";
|
580 |
|
581 |
-
|
582 |
|
583 |
-
foreach ( $files as $i => $val ) {
|
584 |
-
echo "<span style=\"color:#aaa;font-size:11px;\">" . $n++ . "</span> " . $val . "<br />";
|
585 |
-
}
|
586 |
-
echo "</p>\n</div>\n";
|
587 |
-
}
|
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 |
-
?>
|
595 |
|
596 |
|
597 |
-
<br />
|
598 |
-
<div class="joptionswrap">
|
599 |
-
|
600 |
-
<!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>-->
|
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: <input type="text" style="width:75px;" name="mp3foxPlayerWidth" value="<?php echo $O['player_width']; ?>" /> <span class="description">pixels (px) or percent (%)</span></p>
|
605 |
-
<p>Align:
|
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 ); }?> /> 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 |
-
|
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: <input type="text" style="width:145px;" name="loggedout_dload_text" value="<?php echo $O['loggedout_dload_text']; ?>" /> <span class="description">(leave blank for no text/link)</span></p>
|
628 |
-
<p style="margin-left:30px;">Visitor link: <input type="text" style="width:350px;" name="loggedout_dload_link" value="<?php echo $O['loggedout_dload_link']; ?>" /> <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 ); }?> />
|
636 |
-
Try to force browsers to save downloads <span class="description">(no mobile support yet)</span>
|
637 |
-
<!-- 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 |
-
|
|
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 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
<br /><br />
|
654 |
-
<h3 style="margin-left:0;"><strong>Margins</strong></h3>
|
655 |
-
<p>Above players: <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_top" value="<?php echo $O['paddings_top']; ?>" /> <span class="description"> pixels (px) or percent (%)</span><br />
|
656 |
-
Inner margin: (floated players) <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_inner" value="<?php echo $O['paddings_inner']; ?>" /> <span class="description"> pixels (px) or percent (%)</span><br />
|
657 |
-
Below players: <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_bottom" value="<?php echo $O['paddings_bottom']; ?>" /> <span class="description"> 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: <input type="text" size="6" style="text-align:center;" name="mp3foxMaxListHeight" value="<?php echo $O['max_list_height']; ?>" /> px <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 ); }?> /> 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:
|
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 |
-
<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:
|
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 |
-
<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>
|
685 |
-
|
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 ); }?> /> 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 ); }?> /> 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 ); }?> /> Enable the pop-out player</p>
|
697 |
-
<p>Window width: <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutWidth" value="<?php echo $O['popout_width']; ?>" /> px <span class="description"> (250 - 1600)</span></p>
|
698 |
-
<p>Window max height: <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutMaxHeight" value="<?php echo $O['popout_max_height']; ?>" /> px <span class="description"> (200 - 1200) a scroll bar will show for longer playlists</span></p>
|
699 |
-
<p>Launch button text: <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 ); }?> /> 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 ); }?> /> 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 ); }?> /> 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>-->
|
711 |
-
<a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>
|
712 |
-
<div id="fox_op4-list" class="jopbox">
|
713 |
-
|
714 |
-
|
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 ); }?> /> Bypass colour settings<br /> <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 ); }?> /> Bypass player template-tags in theme files<br /> <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 ); }?> /> Include additional js for touch screen support<br /> <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 ); }?> /> Turn on debug<br /> <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? <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>
|
736 |
-
</div>
|
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 ) ?>" /> Remember settings if plugin is deactivated <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 |
-
|
|
|
|
|
|
|
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>
|
745 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
746 |
<?php
|
747 |
}
|
748 |
?>
|
5 |
$O = $mp3_fox->getAdminOptions();
|
6 |
$colours_array = array();
|
7 |
|
8 |
+
$openTab = '0';
|
9 |
+
|
10 |
if ( isset( $_POST['update_mp3foxSettings'] ) )
|
11 |
{
|
12 |
|
159 |
?>
|
160 |
|
161 |
<div class="wrap">
|
162 |
+
|
163 |
<h2> </h2>
|
164 |
+
<h1>MP3-jPlayer
|
165 |
+
<span class="description" style="font-size:10px;"> Version <?php echo $mp3_fox->version_of_plugin; ?></span>
|
166 |
+
<?php
|
167 |
+
if ( $O['disable_jquery_libs'] == "yes" )
|
168 |
+
{
|
169 |
+
echo ' <span style="font-size: 11px; font-weight:700; color:#f66;">(jQuery and UI scripts are turned off)</span>';
|
170 |
+
}
|
171 |
+
?>
|
172 |
+
</h1>
|
173 |
+
<p> </p>
|
174 |
|
175 |
+
<form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
|
176 |
+
|
177 |
+
|
178 |
+
|
179 |
+
|
180 |
+
<div class="mp3j-tabbuttons-wrap">
|
181 |
+
<div class="mp3j-tabbutton" id="mp3j_tabbutton_0">BASICS</div>
|
182 |
+
<div class="mp3j-tabbutton" id="mp3j_tabbutton_1">STYLE</div>
|
183 |
+
<div class="mp3j-tabbutton" id="mp3j_tabbutton_2">FILES</div>
|
184 |
+
<div class="mp3j-tabbutton" id="mp3j_tabbutton_3">PLAYERS</div>
|
185 |
+
<div class="mp3j-tabbutton" id="mp3j_tabbutton_4">POPOUT</div>
|
186 |
+
<div class="mp3j-tabbutton" id="mp3j_tabbutton_5">TEMPLATE</div>
|
187 |
+
<br class="clearB" />
|
188 |
+
</div>
|
189 |
+
<div class="mp3j-tabs-wrap">
|
190 |
+
|
191 |
+
|
192 |
+
<!-- BASICS TAB .......................... -->
|
193 |
+
<div class="mp3j-tab" id="mp3j_tab_0">
|
194 |
+
<div class="tab-header"><span class="description"> </span></div>
|
195 |
|
196 |
+
<p>Initial volume <input type="text" style="text-align:center;" size="2" name="mp3foxVol" value="<?php echo $O['initial_vol']; ?>" /> <span class="description">(0 - 100)</span></p>
|
197 |
+
<br />
|
198 |
+
<p><input type="checkbox" name="mp3foxAutoplay" value="true" <?php if ($O['auto_play'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Autoplay</p>
|
199 |
+
<p><input type="checkbox" name="mp3foxPlaylistRepeat" value="true" <?php if ($O['playlist_repeat'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Loop</p>
|
200 |
+
<p><input type="checkbox" name="mp3foxAddTrackNumbers" value="true" <?php if ($O['add_track_numbering'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Number the tracks</p>
|
201 |
|
202 |
<br />
|
203 |
+
<p><input type="checkbox" name="make_player_from_link" value="true" <?php if ($O['make_player_from_link'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> />
|
204 |
+
Turn mp3 links into players</p>
|
205 |
+
<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>
|
206 |
+
|
207 |
+
|
208 |
+
<br />
|
209 |
+
<p><input type="checkbox" name="mp3foxOnBlog" value="true" <?php if ($O['player_onblog'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Show players in posts on index, archive, and search pages <span class="description">(doesn't affect widgets)</span></p>
|
210 |
+
<p><input type="checkbox" name="runShcodeInExcerpt" value="true" <?php if ($O['run_shcode_in_excerpt'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Allow shortcodes in post excerpts <span class="description">(this works for manually written post excerpts only)</span></p>
|
211 |
+
<br />
|
212 |
+
|
213 |
+
</div><!-- CLOSE BASICS TAB -->
|
214 |
+
|
215 |
+
|
216 |
+
<!-- FILES TAB .......................... -->
|
217 |
+
<div class="mp3j-tab" id="mp3j_tab_2">
|
218 |
+
|
219 |
+
<div class="tab-header"><span class="description"> </span></div>
|
220 |
+
|
221 |
+
<!-- MP3s -->
|
222 |
+
<h3>Media Library</h3>
|
223 |
+
<?php
|
224 |
+
// create library file list //
|
225 |
+
$library = $mp3_fox->grab_library_info();
|
226 |
+
$L_count = ( $library ) ? $library['count'] : "0";
|
227 |
+
echo "<p class=\"description\" style=\"margin:0 0 2px 35px;\">Library contains <strong>" . $L_count . "</strong> mp3";
|
228 |
+
if ( $library['count'] != 1 ) { echo "'s "; }
|
229 |
+
else { echo " "; }
|
230 |
+
|
231 |
+
if ( $L_count > 0 ) {
|
232 |
+
//echo "<a href=\"javascript:mp3jp_listtoggle('fox_library','files');\" id=\"fox_library-toggle\">Show files</a> | <a href=\"media-new.php\">Upload new</a>";
|
233 |
+
echo "<a href=\"javascript:MP3J_ADMIN.showhideit('fox_library','files');\" id=\"fox_library-toggle\">Show files</a> | <a href=\"media-new.php\">Upload new</a>";
|
234 |
+
echo "</p>";
|
235 |
+
echo "<div id=\"fox_library-list\">\n";
|
236 |
+
$liblist = '<p style="margin-left:0px;">';
|
237 |
+
$br = '<br />';
|
238 |
+
$tagclose = '</p>';
|
239 |
+
$n = 1;
|
240 |
+
foreach ( $library['filenames'] as $i => $file ) {
|
241 |
+
//$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " </span> " . $file . " <span style=\"color:#aaa;font-size:11px;\">\"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span>" . $br;
|
242 |
+
switch( $O['library_sortcol'] ) {
|
243 |
+
case "title":
|
244 |
+
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " \"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span> " . $file . $br;
|
245 |
+
break;
|
246 |
+
case "caption":
|
247 |
+
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " " . $library['excerpts'][$i] . " \"" . $library['titles'][$i] . "\"</span> " . $file . $br;
|
248 |
+
break;
|
249 |
+
default:
|
250 |
+
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . "</span> " . $file . " <span style=\"color:#aaa;font-size:11px;\">\"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span>" . $br;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
$liblist .= $tagclose;
|
254 |
+
echo $liblist;
|
255 |
+
echo '</div>';
|
256 |
+
}
|
257 |
+
else { echo "<a href=\"media-new.php\">Upload new</a></p>"; }
|
258 |
+
?>
|
259 |
+
|
260 |
+
<p class="description" style="margin:0 0 0 33px;">You just need to write filenames in playlists to play from the library.</p>
|
261 |
+
<p style="margin:12px 0 12px 34px;">Order playlists by:
|
262 |
+
<select name="librarySortcol" style="width:110px; font-size:11px;">
|
263 |
+
<option value="file" <?php if ( 'file' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Filename</option>
|
264 |
+
<option value="date" <?php if ( 'date' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Date Uploaded</option>
|
265 |
+
<option value="caption" <?php if ( 'caption' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Caption, Title</option>
|
266 |
+
<option value="title" <?php if ( 'title' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Title</option>
|
267 |
+
</select>
|
268 |
+
Direction:
|
269 |
+
<select name="libraryDirection" style="width:60px; font-size:11px;">
|
270 |
+
<option value="ASC" <?php if ( 'ASC' == $O['library_direction'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>ASC</option>
|
271 |
+
<option value="DESC" <?php if ( 'DESC' == $O['library_direction'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>DESC</option>
|
272 |
+
</select>
|
273 |
+
</p><br />
|
274 |
+
|
275 |
+
<!-- Folder -->
|
276 |
+
<h3>Folder or URI</h3>
|
277 |
+
<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>
|
278 |
+
<p style="margin:10px 0px 5px 35px;">Default path: <input type="text" style="width:385px;" name="mp3foxfolder" value="<?php echo $O['mp3_dir']; ?>" /></p>
|
279 |
+
|
280 |
+
<?php
|
281 |
+
// create file-list if directory is local
|
282 |
+
$n = 1;
|
283 |
+
$folderuris = $mp3_fox->grab_local_folder_mp3s( $O['mp3_dir'] );
|
284 |
+
if ( is_array($folderuris) ){
|
285 |
+
foreach ( $folderuris as $i => $uri ) {
|
286 |
+
$files[$i] = strrchr( $uri, "/" );
|
287 |
+
$files[$i] = str_replace( "/", "", $files[$i] );
|
288 |
+
}
|
289 |
+
$c = (!empty($files)) ? count($files) : 0;
|
290 |
+
echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">This folder contains <strong>" . $c . "</strong> mp3";
|
291 |
+
if ( $c != 1 ) { echo "'s "; }
|
292 |
+
else { echo " "; }
|
293 |
+
if ( $c > 0 ) {
|
294 |
+
//echo "<a href=\"javascript:mp3jp_listtoggle('fox_folder','files');\" id=\"fox_folder-toggle\">Show files</a></p>";
|
295 |
+
echo "<a href=\"javascript:MP3J_ADMIN.showhideit('fox_folder','files');\" id=\"fox_folder-toggle\">Show files</a></p>";
|
296 |
+
//echo "<div id=\"fox_folder-list\" style=\"display:none;\">\n<p style=\"margin-left:0px;\">";
|
297 |
+
echo "<div id=\"fox_folder-list\">\n<p style=\"margin-left:0px;\">";
|
298 |
+
|
299 |
+
//natcasesort($files);
|
300 |
+
|
301 |
+
foreach ( $files as $i => $val ) {
|
302 |
+
echo "<span style=\"color:#aaa;font-size:11px;\">" . $n++ . "</span> " . $val . "<br />";
|
303 |
+
}
|
304 |
+
echo "</p>\n</div>\n";
|
305 |
+
}
|
306 |
+
else { echo "</p>"; }
|
307 |
+
}
|
308 |
+
elseif ( $folderuris == true )
|
309 |
+
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>";
|
310 |
+
else
|
311 |
+
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>";
|
312 |
+
?>
|
313 |
+
|
314 |
+
<br />
|
315 |
+
|
316 |
+
<p><input type="checkbox" name="mp3foxHideExtension" value="true" <?php if ($O['hide_mp3extension'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> 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>
|
317 |
+
<p><input type="checkbox" name="mp3foxEncodeFiles" value="true" <?php if ($O['encode_files'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> 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>
|
318 |
+
<p><input type="checkbox" name="mp3foxAllowRemote" value="true" <?php if ($O['allow_remoteMp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> 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>
|
319 |
+
|
320 |
+
|
321 |
+
</div><!-- CLOSE FILES TAB -->
|
322 |
+
|
323 |
+
|
324 |
+
<!-- PLAYERS TAB .......................... -->
|
325 |
+
<div class="mp3j-tab" id="mp3j_tab_3">
|
326 |
+
|
327 |
+
<div class="tab-header"><span class="description">Single player options</span></div>
|
328 |
+
<p><input type="checkbox" name="volslider_onsingles" value="true" <?php if ($O['volslider_on_singles'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Volume sliders on [mp3<strong>t</strong>] players</p>
|
329 |
+
<p><input type="checkbox" name="volslider_onmp3j" value="true" <?php if ($O['volslider_on_mp3j'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Volume sliders on [mp3<strong>j</strong>] players</p>
|
330 |
+
<br /><br />
|
331 |
+
|
332 |
+
<div class="tab-header"><span class="description">Playlist player options</span></div>
|
333 |
+
<p>Width: <input type="text" style="width:75px;" name="mp3foxPlayerWidth" value="<?php echo $O['player_width']; ?>" /> <span class="description">pixels (px) or percent (%)</span></p>
|
334 |
+
<p>Align:
|
335 |
+
<select name="mp3foxFloat" style="width:94px; font-size:11px; line-height:16px;">
|
336 |
+
<option value="none" <?php if ( 'none' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Left</option>
|
337 |
+
<option value="rel-C" <?php if ( 'rel-C' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Centre</option>
|
338 |
+
<option value="rel-R" <?php if ( 'rel-R' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Right</option>
|
339 |
+
<option value="left" <?php if ( 'left' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float left</option>
|
340 |
+
<option value="right" <?php if ( 'right' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float right</option>
|
341 |
+
</select></p>
|
342 |
+
<br /><br />
|
343 |
+
|
344 |
+
<!-- <p><input type="checkbox" name="mp3foxDownloadMp3" value="true" <?php //if ($O['show_downloadmp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Display a 'Download mp3' link</p> -->
|
345 |
+
<h3 style="margin-left:0;"><strong>Downloads</strong></h3>
|
346 |
+
<p style="margin-bottom:10px;">Show download link:
|
347 |
+
<select name="mp3foxDownloadMp3" style="width:120px; font-size:11px; line-height:16px;">
|
348 |
+
<option value="true" <?php if ( 'true' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Yes</option>
|
349 |
+
<option value="false" <?php if ( 'false' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>No</option>
|
350 |
+
<option value="loggedin" <?php if ( 'loggedin' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>To logged in users</option>
|
351 |
+
</select>
|
352 |
+
|
353 |
+
</p>
|
354 |
+
|
355 |
+
<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>
|
356 |
+
<p style="margin-left:30px;">Visitor text: <input type="text" style="width:145px;" name="loggedout_dload_text" value="<?php echo $O['loggedout_dload_text']; ?>" /> <span class="description">(leave blank for no text/link)</span></p>
|
357 |
+
<p style="margin-left:30px;">Visitor link: <input type="text" style="width:350px;" name="loggedout_dload_link" value="<?php echo $O['loggedout_dload_link']; ?>" /> <span class="description">(optional url for visitor text)</span></p>
|
358 |
+
|
359 |
+
<br />
|
360 |
+
<!--<span class="description">(can be set per-player via shortcodes)</span>-->
|
361 |
+
|
362 |
+
<p>Download link text: <input type="text" style="width:140px;" name="dload_text" value="<?php echo $O['dload_text']; ?>" /></p>
|
363 |
|
364 |
+
<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 ); }?> />
|
365 |
+
Try to force browsers to save downloads <span class="description">(no mobile support yet)</span>
|
366 |
+
<!-- Local files
|
367 |
+
<input type="radio" name="force_browser_dload_remote" value="false" <?php //if ($O['force_browser_dload_remote'] == "false") { echo 'checked="checked"'; } ?> />
|
368 |
+
|
|
369 |
+
<input type="radio" name="force_browser_dload_remote" value="true" <?php //if ($O['force_browser_dload_remote'] == "true") { echo 'checked="checked"'; } ?>/>
|
370 |
+
All files -->
|
371 |
+
</p>
|
372 |
|
373 |
+
<p style="margin:10px 0 0 30px;"><span class="description">If you play from other domains and want to force the download, then use
|
374 |
+
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>
|
375 |
+
|
376 |
+
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
|
378 |
+
<!--<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.
|
379 |
+
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>-->
|
380 |
|
381 |
+
|
382 |
+
<br /><br />
|
383 |
+
<h3 style="margin-left:0;"><strong>Margins</strong></h3>
|
384 |
+
<p>Above players: <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_top" value="<?php echo $O['paddings_top']; ?>" /> <span class="description"> pixels (px) or percent (%)</span><br />
|
385 |
+
Inner margin: (floated players) <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_inner" value="<?php echo $O['paddings_inner']; ?>" /> <span class="description"> pixels (px) or percent (%)</span><br />
|
386 |
+
Below players: <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_bottom" value="<?php echo $O['paddings_bottom']; ?>" /> <span class="description"> pixels (px) or percent (%)</span></p>
|
387 |
+
|
388 |
+
|
389 |
+
<br /><br />
|
390 |
+
<h3 style="margin-left:0;"><strong>Playlists</strong></h3>
|
391 |
+
<p>Max playlist height: <input type="text" size="6" style="text-align:center;" name="mp3foxMaxListHeight" value="<?php echo $O['max_list_height']; ?>" /> px <span class="description">(a scroll bar will show for longer playlists, leave it blank for no limit)</span></p>
|
392 |
+
<p><input type="checkbox" name="mp3foxShowPlaylist" value="true" <?php if ($O['playlist_show'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Start with playlists showing</p>
|
393 |
|
394 |
+
<div style="margin: 10px 0px 10px 0px; padding:6px; background:#f9f9f9; border:1px solid #eee;">
|
395 |
+
<p>Playlist Separators <span class="description">- CAUTION: You'll need to manually update any existing playlists if you change the separators!</p>
|
396 |
+
<p style="margin-left:20px;">Files:
|
397 |
+
<select name="file_separator" style="width:120px; font-size:11px; line-height:16px;">
|
398 |
+
<option value="," <?php if ( ',' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>, (comma)</option>
|
399 |
+
<option value=";" <?php if ( ';' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>; (semicolon)</option>
|
400 |
+
<option value="###" <?php if ( '###' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>### (3 hashes)</option>
|
401 |
+
</select>
|
402 |
+
<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>
|
403 |
|
404 |
+
<p style="margin-left:20px;">Captions:
|
405 |
+
<select name="caption_separator" style="width:120px; font-size:11px; line-height:16px;">
|
406 |
+
<option value="," <?php if ( ',' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>, (comma)</option>
|
407 |
+
<option value=";" <?php if ( ';' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>; (semicolon)</option>
|
408 |
+
<option value="###" <?php if ( '###' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>### (3 hashes)</option>
|
409 |
+
</select>
|
410 |
+
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
</div>
|
412 |
+
|
413 |
+
</div><!-- CLOSE PLAYERS TAB -->
|
414 |
+
|
415 |
+
|
416 |
+
<!-- POPOUT TAB .......................... -->
|
417 |
+
<div class="mp3j-tab" id="mp3j_tab_4">
|
418 |
+
<div class="tab-header"><span class="description"> </span></div>
|
419 |
|
420 |
+
<p><input type="checkbox" name="mp3foxEnablePopout" value="true" <?php if ($O['enable_popout'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Enable the pop-out player</p>
|
421 |
+
<p>Window width: <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutWidth" value="<?php echo $O['popout_width']; ?>" /> px <span class="description"> (250 - 1600)</span></p>
|
422 |
+
<p>Window max height: <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutMaxHeight" value="<?php echo $O['popout_max_height']; ?>" /> px <span class="description"> (200 - 1200) a scroll bar will show for longer playlists</span></p>
|
423 |
+
<p>Launch button text: <input type="text" style="width:200px;" name="mp3foxPopoutButtonText" value="<?php echo $O['popout_button_title']; ?>" /></p>
|
424 |
|
425 |
+
</div><!-- CLOSE POPOUT TAB -->
|
426 |
+
|
427 |
+
|
428 |
+
<!-- TEMPLATE TAB .......................... -->
|
429 |
+
<div class="mp3j-tab" id="mp3j_tab_5">
|
430 |
+
<div class="tab-header"><span class="description"> </span></div>
|
|
|
431 |
|
432 |
+
<?php $greyout_text = ( $O['disable_jquery_libs'] == "yes" ) ? ' style="color:#d6d6d6;"' : ''; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
|
434 |
+
<p style="margin:10px 0 10px 0px;">Shortcode for 'Turn mp3 links into players' option:</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
|
436 |
+
<p style="margin:0px 0 20px 25px;"><textarea class="widefat" style="width:580px; height:100px;" name="make_player_from_link_shcode"><?php
|
437 |
+
$deslashed = str_replace('\"', '"', $O['make_player_from_link_shcode'] );
|
438 |
+
echo $deslashed;
|
439 |
+
?></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>
|
440 |
|
441 |
|
442 |
+
<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 ); }?> /> Include additional js for touch screen support<br /> <span class="description"<?php echo $greyout_text; ?>>(adds jquery.ui.touch-punch.js script)</span></p>
|
443 |
+
<p><input type="checkbox" name="mp3foxUseFixedCSS" value="true" <?php if ($O['use_fixed_css'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Bypass colour settings<br /> <span class="description">(colours can still be set in css)</span></p>
|
444 |
+
<p><input type="checkbox" name="disableTemplateTag" value="true" <?php if ($O['disable_template_tag'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Bypass player template-tags in theme files<br /> <span class="description">(ignores mp3j_addscripts() and mp3j_put() template functions)</span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
|
448 |
+
<p><input type="checkbox" name="mp3foxEchoDebug" value="true" <?php if ($O['echo_debug'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Turn on debug<br /> <span class="description">(info appears in the source view near the bottom)</span></p>
|
449 |
+
<?php $bgc = ( $O['disable_jquery_libs'] == "yes" ) ? "#fdd" : "#f9f9f9"; ?>
|
450 |
+
<div style="margin: 20px 0px 10px 0px; padding:6px; background:<?php echo $bgc; ?>; border:1px solid #eee;">
|
451 |
+
<p style="margin:0 0 5px 18px;">Disable jQuery and jQuery-UI javascript libraries? <input type="text" style="width:60px;" name="disableJSlibs" value="<?php echo $O['disable_jquery_libs']; ?>" /></p>
|
452 |
+
<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,
|
453 |
+
you <strong>MUST</strong> be providing these scripts from an alternative source.
|
454 |
+
<br />Type <code>yes</code> in the box and save settings to bypass jQuery and jQuery-UI.</span></p>
|
455 |
+
</div>
|
456 |
+
|
457 |
+
</div><!-- CLOSE TEMPLATE TAB -->
|
458 |
+
|
459 |
+
|
460 |
+
<!-- COLOURS TAB .......................... -->
|
461 |
+
<div class="mp3j-tab" id="mp3j_tab_1">
|
462 |
+
<div class="tab-header"><span class="description"> </span></div>
|
463 |
+
|
464 |
+
<?php
|
465 |
+
$greyout_field = ( $O['player_theme'] != "styleI" ) ? "background:#fcfcfc; color:#d6d6d6; border-color:#f0f0f0;" : "background:#fff; color:#000; border-color:#dfdfdf;";
|
466 |
+
$greyout_text = ( $O['player_theme'] != "styleI" ) ? "color:#d6d6d6;" : "color:#444;";
|
467 |
+
?>
|
468 |
+
<!-- COLOUR / STYLE -->
|
469 |
+
<div style="height:35px"><p style="width:55px; margin:0 0 0 0px; line-height:32px;">Players:</p></div>
|
470 |
+
<p style="margin:-35px 0px 0px 55px; line-height:32px;"><select name="mp3foxTheme" id="player-select" style="width:94px; font-size:11px; line-height:19px;">
|
471 |
+
<option value="styleF" <?php if ( 'styleF' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Silver</option>
|
472 |
+
<option value="styleG" <?php if ( 'styleG' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Dark</option>
|
473 |
+
<option value="styleH" <?php if ( 'styleH' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Text</option>
|
474 |
+
<option value="styleI" <?php if ( 'styleI' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Custom</option>
|
475 |
+
</select>
|
476 |
+
<span id="player-csssheet" style=" <?php echo $greyout_text; ?>"> uri:</span><input type="text" id="mp3fcss" style="width:480px; <?php echo $greyout_field; ?>" name="mp3foxCustomStylesheet" value="<?php echo $O['custom_stylesheet']; ?>" /></p>
|
477 |
+
|
478 |
+
<br /><br />
|
479 |
<div style="position:relative; width:579px; height:20px; padding-top:2px; border-top:1px solid #eee; border-bottom:1px solid #eee; background:#f9f9f9;">
|
480 |
<div style="float:left; width:90px; margin-left:9px;"><p class="description" style="margin:0px;"><strong>AREA</strong></p></div>
|
481 |
<div style="float:left; width:390px;"><p class="description" style="margin:0px;"> Opacity Colour</p></div>
|
608 |
<br clear="all" />
|
609 |
</div>
|
610 |
<p class="description" style="margin-top: 30px; margin-bottom: 0px;"> (Opacity values from 0 to 100, leave any fields blank to use the default setting)</p>
|
611 |
+
|
612 |
+
|
613 |
+
|
614 |
+
</div><!-- CLOSE COLOURS TAB -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
|
617 |
+
</div>
|
618 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
|
620 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
|
622 |
+
|
623 |
+
|
624 |
+
<br /><br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
<p style="margin-top: 4px;"><input type="submit" name="update_mp3foxSettings" class="button-primary" value="<?php _e('Update Settings', $mp3_fox->textdomain ) ?>" /> Remember settings if plugin is deactivated <input type="checkbox" name="mp3foxRemember" value="true" <?php if ($O['remember_settings'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /></p>
|
626 |
<input id="fox_styling" type="hidden" name="MtogBox1" value="<?php echo $O['admin_toggle_1']; // Colour settings toggle state ?>" />
|
627 |
<input type="hidden" name="mp3foxPluginVersion" value="<?php echo $mp3_fox->version_of_plugin; ?>" />
|
628 |
+
|
629 |
+
</form>
|
630 |
+
<br />
|
631 |
+
|
632 |
<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>
|
633 |
</div>
|
634 |
+
|
635 |
+
|
636 |
+
|
637 |
+
<!-- Tabs JS -->
|
638 |
+
<script type="text/javascript">
|
639 |
+
var MP3jP = {
|
640 |
+
|
641 |
+
openTab: <?php echo $openTab; ?>,
|
642 |
+
|
643 |
+
add_tab_listener: function ( j ) {
|
644 |
+
var that = this;
|
645 |
+
jQuery('#mp3j_tabbutton_' + j).click( function (e) {
|
646 |
+
that.changeTab( j );
|
647 |
+
});
|
648 |
+
},
|
649 |
+
|
650 |
+
changeTab: function ( j ) {
|
651 |
+
if ( j !== this.openTab ) {
|
652 |
+
jQuery('#mp3j_tab_' + this.openTab).hide();
|
653 |
+
jQuery('#mp3j_tabbutton_' + this.openTab).removeClass('active-tab');
|
654 |
+
jQuery('#mp3j_tab_' + j).show();
|
655 |
+
jQuery('#mp3j_tabbutton_' + j).addClass('active-tab');
|
656 |
+
this.openTab = j;
|
657 |
+
}
|
658 |
+
},
|
659 |
+
|
660 |
+
init: function () {
|
661 |
+
var that = this;
|
662 |
+
jQuery( '.mp3j-tabbutton').each( function ( j ) {
|
663 |
+
that.add_tab_listener( j );
|
664 |
+
if ( j !== that.openTab ) {
|
665 |
+
jQuery('#mp3j_tab_' + j ).hide();
|
666 |
+
}
|
667 |
+
});
|
668 |
+
jQuery('#mp3j_tabbutton_' + this.openTab ).addClass('active-tab');
|
669 |
+
}
|
670 |
+
};
|
671 |
+
</script>
|
672 |
+
|
673 |
+
<!-- On load -->
|
674 |
+
<script>
|
675 |
+
jQuery(document).ready( function () {
|
676 |
+
MP3jP.init();
|
677 |
+
});
|
678 |
+
</script>
|
679 |
+
|
680 |
+
|
681 |
+
|
682 |
+
|
683 |
+
|
684 |
+
|
685 |
+
|
686 |
<?php
|
687 |
}
|
688 |
?>
|
mp3j_frontend.php
CHANGED
@@ -98,6 +98,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
|
|
98 |
echo "
|
99 |
MP3_JPLAYER.vars.play_f = " . $this->theSettings['encode_files'] . ";
|
100 |
MP3_JPLAYER.vars.force_dload = " . $this->theSettings['force_browser_dload'] . ";
|
|
|
101 |
MP3_JPLAYER.plugin_path = '" . $this->PluginFolder . "';";
|
102 |
|
103 |
if ( $this->theSettings['force_browser_dload'] == "true" ) {
|
98 |
echo "
|
99 |
MP3_JPLAYER.vars.play_f = " . $this->theSettings['encode_files'] . ";
|
100 |
MP3_JPLAYER.vars.force_dload = " . $this->theSettings['force_browser_dload'] . ";
|
101 |
+
MP3_JPLAYER.lastformats = '" . $this->FIRST_FORMATS . "';
|
102 |
MP3_JPLAYER.plugin_path = '" . $this->PluginFolder . "';";
|
103 |
|
104 |
if ( $this->theSettings['force_browser_dload'] == "true" ) {
|
mp3j_main.php
CHANGED
@@ -1 +1,1299 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
|
3 |
+
|
4 |
+
// ---------------------- Update Me
|
5 |
+
var $version_of_plugin = "1.8.10";
|
6 |
+
var $M_no = 0;
|
7 |
+
var $F_no = 0;
|
8 |
+
var $S_no = 0;
|
9 |
+
var $Caller = false;
|
10 |
+
var $S_autotrack = 0;
|
11 |
+
var $S_arb = 1;
|
12 |
+
var $Player_ID = 0;
|
13 |
+
var $scriptsflag = "false";
|
14 |
+
var $JPdiv = false;
|
15 |
+
var $postID = false;
|
16 |
+
var $F_listname = false;
|
17 |
+
var $F_listlength = false;
|
18 |
+
var $LibraryI = false;
|
19 |
+
var $JS = array(
|
20 |
+
'playlists' => array(),
|
21 |
+
'listref' => array(),
|
22 |
+
'players' => array(),
|
23 |
+
'Stitle' => ''
|
24 |
+
);
|
25 |
+
var $dbug = array(
|
26 |
+
'str' => '',
|
27 |
+
'arr' => array()
|
28 |
+
);
|
29 |
+
var $adminOptionsName = "mp3FoxAdminOptions";
|
30 |
+
var $theSettings = array();
|
31 |
+
var $Rooturl;
|
32 |
+
var $WPinstallpath;
|
33 |
+
var $textdomain = "mp3-jplayer";
|
34 |
+
var $newCSScustom;
|
35 |
+
var $stylesheet = "";
|
36 |
+
var $folder_order = "asc";
|
37 |
+
var $PP_css_url = "";
|
38 |
+
var $PP_css_settings = "";
|
39 |
+
var $PluginFolder = "";
|
40 |
+
|
41 |
+
var $FIRST_FORMATS = false;
|
42 |
+
|
43 |
+
/* Set some vars and make compatible */
|
44 |
+
function MP3j_Main () {
|
45 |
+
$this->WPinstallpath = get_bloginfo('wpurl');
|
46 |
+
//$this->theSettings = $this->getAdminOptions();
|
47 |
+
$this->Rooturl = preg_replace("/^www\./i", "", $_SERVER['HTTP_HOST']);
|
48 |
+
$this->PluginFolder = plugins_url('', __FILE__);
|
49 |
+
$this->newCSScustom = $this->PluginFolder . "/css/player-silverALT.css";
|
50 |
+
$this->theSettings = $this->getAdminOptions();
|
51 |
+
}
|
52 |
+
|
53 |
+
/* Returns library mp3 filenames, titles,
|
54 |
+
excerpts, content, uri's, id's in indexed arrays. */
|
55 |
+
function grab_library_info() {
|
56 |
+
if ( !$this->LibraryI ) {
|
57 |
+
$direction = $this->theSettings['library_direction'];
|
58 |
+
switch( $this->theSettings['library_sortcol'] ) {
|
59 |
+
case "date":
|
60 |
+
$order = " ORDER BY post_date " . $direction;
|
61 |
+
break;
|
62 |
+
case "title":
|
63 |
+
$order = " ORDER BY post_title " . $direction;
|
64 |
+
break;
|
65 |
+
case "caption":
|
66 |
+
$order = " ORDER BY post_excerpt " . $direction . ", post_title " . $direction;
|
67 |
+
break;
|
68 |
+
default:
|
69 |
+
$order = "";
|
70 |
+
}
|
71 |
+
global $wpdb;
|
72 |
+
$audio = $wpdb->get_results("SELECT DISTINCT guid, post_title, post_excerpt, post_content, ID FROM $wpdb->posts WHERE post_mime_type = 'audio/mpeg'" . $order);
|
73 |
+
|
74 |
+
if ( !empty($audio) ) {
|
75 |
+
foreach ( $audio as $obj ) {
|
76 |
+
if ( preg_match("!\.mp3$!i", $obj->guid) ) { //audio/mpeg has multiple file types so grab just mp3's
|
77 |
+
$Titles[] = $obj->post_title;
|
78 |
+
$Excerpts[] = $obj->post_excerpt;
|
79 |
+
$Descriptions[] = $obj->post_content;
|
80 |
+
$PostIDs[] = $obj->ID;
|
81 |
+
$URLs[] = $obj->guid;
|
82 |
+
$File = strrchr( $obj->guid, "/");
|
83 |
+
$Filenames[] = str_replace( "/", "", $File);
|
84 |
+
}
|
85 |
+
}
|
86 |
+
if ( !empty($Filenames) ) {
|
87 |
+
if ( $this->theSettings['library_sortcol'] == "file" ) {
|
88 |
+
natcasesort($Filenames);
|
89 |
+
if ( $direction == "DESC" ) {
|
90 |
+
$Filenames = array_reverse($Filenames, true);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
$c = count($Filenames);
|
94 |
+
$this->LibraryI = array(
|
95 |
+
'filenames' => $Filenames,
|
96 |
+
'titles' => $Titles,
|
97 |
+
'urls' => $URLs,
|
98 |
+
'excerpts' => $Excerpts,
|
99 |
+
'descriptions' => $Descriptions,
|
100 |
+
'postIDs' => $PostIDs,
|
101 |
+
'count' => $c
|
102 |
+
);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
//$this->dbug['arr']['Library'] = $this->LibraryI;
|
106 |
+
}
|
107 |
+
return $this->LibraryI;
|
108 |
+
}
|
109 |
+
|
110 |
+
/* Reads mp3's from a local
|
111 |
+
directory, returns array of uri's */
|
112 |
+
function grab_local_folder_mp3s( $folder ) {
|
113 |
+
$items = array();
|
114 |
+
if ( ($lp = strpos($folder, $this->Rooturl)) || preg_match("!^/!", $folder) ) {
|
115 |
+
if ( $lp !== false ) {
|
116 |
+
$fp = str_replace($this->Rooturl, "", $folder);
|
117 |
+
$fp = str_replace("www.", "", $fp);
|
118 |
+
$fp = str_replace("http://", "", $fp);
|
119 |
+
$fp = str_replace("https://", "", $fp);
|
120 |
+
} else {
|
121 |
+
$fp = $folder;
|
122 |
+
}
|
123 |
+
$path = $_SERVER['DOCUMENT_ROOT'] . $fp;
|
124 |
+
if ($handle = @opendir($path)) {
|
125 |
+
$j=0;
|
126 |
+
while (false !== ($file = readdir($handle))) {
|
127 |
+
if ( $file != '.' && $file != '..' && filetype($path.'/'.$file) == 'file' && preg_match("!\.mp3$!i", $file) ) {
|
128 |
+
$items[$j++] = $file;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
closedir($handle);
|
132 |
+
if ( ($c = count($items)) > 0 ) {
|
133 |
+
natcasesort($items);
|
134 |
+
if ( $this->folder_order != "asc" ) {
|
135 |
+
$items = array_reverse($items, true);
|
136 |
+
}
|
137 |
+
$fp = preg_replace( "!/+$!", "", $fp );
|
138 |
+
foreach ( $items as $i => $mp3 ) {
|
139 |
+
$items[$i] = "http://" . $_SERVER['HTTP_HOST'] . $fp . "/" . $mp3;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
$this->dbug['str'] .= "\nRead folder - Done, " . $c . "mp3(s) in folder http://" . $_SERVER['HTTP_HOST'] . $fp;
|
143 |
+
return $items; //the tracks array
|
144 |
+
} else {
|
145 |
+
$this->dbug['str'] .= "\nRead folder - Couldn't open local folder, check path/permissions to http://" . $_SERVER['HTTP_HOST'] . $fp;
|
146 |
+
return true;
|
147 |
+
}
|
148 |
+
} else {
|
149 |
+
$this->dbug['str'] .= "\nRead folder - Path was remote or unreadable." . $fp;
|
150 |
+
return false;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
/* Makes keys/values from a post's meta,
|
155 |
+
returns K's (captions) and V's (title@file). */
|
156 |
+
function meta_to_KVs( $id = "" ) {
|
157 |
+
if ( $id == "" ) {
|
158 |
+
global $post;
|
159 |
+
if ( $post->ID == "" ) { return false; }
|
160 |
+
$id = $post->ID;
|
161 |
+
}
|
162 |
+
global $wpdb;
|
163 |
+
$postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id =" .$id. " AND meta_value!='' ORDER BY meta_key ASC");
|
164 |
+
|
165 |
+
if ( !empty($postmeta) ) {
|
166 |
+
$Ks = array();
|
167 |
+
$Vs = array();
|
168 |
+
foreach ( $postmeta as $obj ) {
|
169 |
+
if ( preg_match('/^([0-9]+(\s)?)?mp3(\..*)?$/', $obj->meta_key) == 1 ) {
|
170 |
+
$Ks[] = $obj->meta_key;
|
171 |
+
$Vs[] = $obj->meta_value;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
if ( !empty($Ks) ) { //sort by keys (user numbering), clean up captions, get feeds
|
175 |
+
natcasesort($Ks);
|
176 |
+
foreach ($Ks as $i => $k ) {
|
177 |
+
$splitkey = explode('.', $k, 2);
|
178 |
+
$ks[] = ( empty($splitkey[1]) ) ? "" : $splitkey[1];
|
179 |
+
$vs[] = $Vs[$i];
|
180 |
+
}
|
181 |
+
$meta = $this->collect_delete_feeds( $vs, $ks ); //adds the feeds
|
182 |
+
return array(
|
183 |
+
'Ks' => $meta['Ks'],
|
184 |
+
'Vs' => $meta['Vs']
|
185 |
+
);
|
186 |
+
}
|
187 |
+
}
|
188 |
+
return false;
|
189 |
+
}
|
190 |
+
|
191 |
+
/* Adds/makes playlist from comma separated
|
192 |
+
lists of tracks/captions. Returns a playlist. */
|
193 |
+
function string_to_playlist( $Vstring, $Kstring = "", $images = "", $imglinks = "" ) {
|
194 |
+
$V_sep = $this->theSettings['f_separator']; // tracks separator
|
195 |
+
$K_sep = $this->theSettings['c_separator']; // captions separator
|
196 |
+
//clean strings
|
197 |
+
$Vstring = str_replace( array("</p>", "<p>", "<br />", "<br>", "<br/>", chr(10), chr(13)), "", $Vstring );
|
198 |
+
$Vstring = trim( $Vstring );
|
199 |
+
$Vstring = trim( $Vstring, $V_sep );
|
200 |
+
if ( empty($Vstring) ) {
|
201 |
+
return false;
|
202 |
+
}
|
203 |
+
$Kstring = str_replace( array("</p>", "<p>", "<br />", "<br>", "<br/>", chr(10), chr(13)), "", $Kstring );
|
204 |
+
$Kstring = trim( $Kstring );
|
205 |
+
$Kstring = trim( $Kstring, $K_sep );
|
206 |
+
|
207 |
+
//make V's
|
208 |
+
$Vs = explode( $V_sep, $Vstring );
|
209 |
+
foreach ( $Vs as $i => $file ) {
|
210 |
+
$Vs[$i] = trim($file);
|
211 |
+
}
|
212 |
+
//make K's
|
213 |
+
$ks = array();
|
214 |
+
if ( !empty($Kstring) ) {
|
215 |
+
$ks = explode( $K_sep, $Kstring );
|
216 |
+
}
|
217 |
+
foreach ( $Vs as $i => $v ) {
|
218 |
+
$Ks[$i] = (empty($ks[$i])) ? "" : trim($ks[$i]);
|
219 |
+
}
|
220 |
+
//add any feeds
|
221 |
+
$meta = $this->collect_delete_feeds( $Vs, $Ks );
|
222 |
+
|
223 |
+
|
224 |
+
//make images array
|
225 |
+
$imgs = array();
|
226 |
+
if ( !empty($images) ) {
|
227 |
+
$images = trim( $images, ',' );
|
228 |
+
$imgs = explode( ',', $images );
|
229 |
+
}
|
230 |
+
foreach ( $meta['Vs'] as $i => $v ) {
|
231 |
+
$IMGs[$i] = (empty($imgs[$i])) ? "" : trim($imgs[$i]);
|
232 |
+
}
|
233 |
+
//make image urls array
|
234 |
+
$iurls = array();
|
235 |
+
if ( !empty($imglinks) ) {
|
236 |
+
$imglinks = trim( $imglinks, ',' );
|
237 |
+
$iurls = explode( ',', $imglinks );
|
238 |
+
}
|
239 |
+
foreach ( $meta['Vs'] as $i => $v ) {
|
240 |
+
$IURLs[$i] = (empty($iurls[$i])) ? "" : trim($iurls[$i]);
|
241 |
+
}
|
242 |
+
|
243 |
+
//make playlist
|
244 |
+
$pl = $this->generate_playlist( $meta['Ks'], $meta['Vs'], $IMGs, $IURLs );
|
245 |
+
if ( $pl['count'] < 1 ) {
|
246 |
+
return false;
|
247 |
+
}
|
248 |
+
return $pl;
|
249 |
+
}
|
250 |
+
|
251 |
+
/* Adds any FEEDs into K's/V's */
|
252 |
+
function collect_delete_feeds( $values, $keys ){
|
253 |
+
|
254 |
+
$Vs = array();
|
255 |
+
$Ks = array();
|
256 |
+
|
257 |
+
foreach ( $values as $i => $val ) {
|
258 |
+
if ( preg_match( "!^FEED:(DF|ID|LIB|/.*)$!i", $val ) == 1 ) { // keep ID for backwards compat
|
259 |
+
$feedV = stristr( $val, ":" );
|
260 |
+
$feedV = str_replace( ":", "", $feedV );
|
261 |
+
$feedK = ( !empty($keys[$i]) ) ? $keys[$i] : "";
|
262 |
+
$fed = $this->get_feed( $feedK, $feedV ); // gets the FEED tracks
|
263 |
+
foreach ( $fed['Vs'] as $j => $v ) {
|
264 |
+
$Vs[] = $v;
|
265 |
+
$Ks[] = $fed['Ks'][$j];
|
266 |
+
}
|
267 |
+
} else {
|
268 |
+
$Vs[] = $val;
|
269 |
+
$Ks[] = $keys[$i];
|
270 |
+
}
|
271 |
+
}
|
272 |
+
return array(
|
273 |
+
'Vs' => $Vs,
|
274 |
+
'Ks' => $Ks
|
275 |
+
);
|
276 |
+
}
|
277 |
+
|
278 |
+
/* Takes a FEED key/value and makes
|
279 |
+
tracks/captions arrays accordingly */
|
280 |
+
function get_feed( $feedK, $feedV ) {
|
281 |
+
|
282 |
+
$Vs = array();
|
283 |
+
$Ks = array();
|
284 |
+
|
285 |
+
if ( $feedV == "ID" ) {
|
286 |
+
// do nothing
|
287 |
+
// since 1.5
|
288 |
+
} elseif ( $feedV == "LIB" ) {
|
289 |
+
$lib = $this->grab_library_info();
|
290 |
+
if ( $lib ) {
|
291 |
+
foreach ( $lib['filenames'] as $j => $x ) {
|
292 |
+
$Vs[] = $x;
|
293 |
+
$Ks[] = ( empty($feedK) ) ? $lib['excerpts'][$j] : $feedK;
|
294 |
+
}
|
295 |
+
}
|
296 |
+
} else { //assume folder
|
297 |
+
if ( $feedV == "DF" ) {
|
298 |
+
$feedV = $this->theSettings['mp3_dir'];
|
299 |
+
}
|
300 |
+
$tracks = $this->grab_local_folder_mp3s( $feedV );
|
301 |
+
if ( $tracks !== true && $tracks !== false && count($tracks) > 0 ) {
|
302 |
+
foreach ( $tracks as $j => $x ) {
|
303 |
+
$Vs[] = $x;
|
304 |
+
$Ks[] = $feedK;
|
305 |
+
}
|
306 |
+
}
|
307 |
+
}
|
308 |
+
return array(
|
309 |
+
'Vs' => $Vs,
|
310 |
+
'Ks' => $Ks
|
311 |
+
);
|
312 |
+
}
|
313 |
+
|
314 |
+
/* Makes a playlist
|
315 |
+
from K's and V's */
|
316 |
+
function generate_playlist( $ks, $vs, $IMGs = array(), $IURLs = array() ) {
|
317 |
+
if ( count($vs) == 0 ) {
|
318 |
+
return false;
|
319 |
+
}
|
320 |
+
$Ts = $this->splitout_KVs( $ks, $vs );
|
321 |
+
$playlist = $this->compare_swap( $Ts, $vs, $IMGs, $IURLs );
|
322 |
+
if ( $this->theSettings['allow_remoteMp3'] == "false" ) {
|
323 |
+
$playlist = $this->remove_mp3remote( $playlist );
|
324 |
+
}
|
325 |
+
return ( empty($playlist) ) ? false : $playlist;
|
326 |
+
}
|
327 |
+
|
328 |
+
/* Splits out V's
|
329 |
+
into file and title arrays */
|
330 |
+
function splitout_KVs( $ks, $vs ) {
|
331 |
+
$vs = str_replace( array(chr(10), chr(13)), "", $vs ); //remove \n and \r characters
|
332 |
+
foreach ( $vs as $i => $v ) {
|
333 |
+
$v_rev = strrev($v);
|
334 |
+
$v_split = explode('@', $v_rev, 2);
|
335 |
+
//filenames
|
336 |
+
$Filenames[$i] = strrev($v_split[0]);
|
337 |
+
if ( preg_match('/^www\./i', $Filenames[$i]) && $Filenames[$i] != "www.mp3" ) { //if it's url with no http
|
338 |
+
$Filenames[$i] = "http://" . $Filenames[$i];
|
339 |
+
}
|
340 |
+
//titles
|
341 |
+
if ( empty($v_split[1]) ) {
|
342 |
+
$Titles[$i] = ( $this->theSettings['hide_mp3extension'] == "true" ) ? preg_replace( '/(\.mp3|\.m4a)$/i', "", $Filenames[$i] ) : $Filenames[$i];
|
343 |
+
} else {
|
344 |
+
$Titles[$i] = strrev($v_split[1]);
|
345 |
+
}
|
346 |
+
}
|
347 |
+
return array( 'artists' => $ks, 'titles' => $Titles, 'files' => $Filenames );
|
348 |
+
}
|
349 |
+
|
350 |
+
/* Does caption, title, path
|
351 |
+
swapping and cleaning */
|
352 |
+
function compare_swap( $Ts, $vs, $IMGs, $IURLs ) {
|
353 |
+
$lib = $this->grab_library_info();
|
354 |
+
foreach ( $Ts['files'] as $i => $file ) {
|
355 |
+
$lib_ID = ( $lib === false ) ? false : array_search( $file, $lib['filenames'] );
|
356 |
+
$http = ( strpos($file, 'http://') === false && strpos($file, 'https://') === false ) ? false : true;
|
357 |
+
|
358 |
+
if ( $lib_ID !== false ) { //in library
|
359 |
+
$Ts['files'][$i] = $lib['urls'][$lib_ID];
|
360 |
+
$Ts['titles'][$i] = ( strpos($vs[$i], '@') === false ) ? $lib['titles'][$lib_ID] : $Ts['titles'][$i];
|
361 |
+
$Ts['artists'][$i] = ( $Ts['artists'][$i] == "" ) ? $lib['excerpts'][$lib_ID] : $Ts['artists'][$i];
|
362 |
+
} else {
|
363 |
+
if ( $http ) { //uri
|
364 |
+
if ( strpos($Ts['titles'][$i], 'http://') !== false || strpos($Ts['titles'][$i], 'https://') !== false ) {
|
365 |
+
$Ts['titles'][$i] = strrchr($Ts['titles'][$i], "/");
|
366 |
+
$Ts['titles'][$i] = str_replace( "/", "", $Ts['titles'][$i]);
|
367 |
+
}
|
368 |
+
} else { //local path
|
369 |
+
if ( strpos($Ts['files'][$i], "/") !== 0 ) { //prepend df path
|
370 |
+
$Ts['files'][$i] = ( $this->theSettings['mp3_dir'] == "/" ) ? $this->theSettings['mp3_dir'] . $Ts['files'][$i] : $this->theSettings['mp3_dir'] . "/" . $Ts['files'][$i];
|
371 |
+
}
|
372 |
+
}
|
373 |
+
}
|
374 |
+
$Order[] = $i;
|
375 |
+
$IMGs[$i] = (empty($IMGs[$i])) ? "" : $IMGs[$i];
|
376 |
+
$IURLs[$i] = (empty($IURLs[$i])) ? "" : $IURLs[$i];
|
377 |
+
}
|
378 |
+
$Ts['titles'] = str_replace('"', '\"', $Ts['titles']); //escape quotes for js
|
379 |
+
$Ts['artists'] = str_replace('"', '\"', $Ts['artists']); //escape quotes for js
|
380 |
+
$n = count($Ts['files']);
|
381 |
+
return array( 'artists' => $Ts['artists'], 'titles' => $Ts['titles'], 'files' => $Ts['files'], 'order' => $Order, 'count' => $n, 'images' => $IMGs, 'imgurls' => $IURLs );
|
382 |
+
}
|
383 |
+
|
384 |
+
/* Removes remote uri's.
|
385 |
+
if the admin option is not ticked */
|
386 |
+
function remove_mp3remote( $Ts ) {
|
387 |
+
foreach ( $Ts['order'] as $ik => $i ) {
|
388 |
+
if ( strpos($Ts['files'][$i], $this->Rooturl) !== false
|
389 |
+
|| (strpos($Ts['files'][$i], "http://") === false && strpos($Ts['files'][$i], "https://") === false)
|
390 |
+
|| (strpos($this->theSettings['mp3_dir'], "http://") !== false && strpos($Ts['files'][$i], $this->theSettings['mp3_dir']) !== false) ) {
|
391 |
+
$Files[$i] = $Ts['files'][$i];
|
392 |
+
$Titles[$i] = $Ts['titles'][$i];
|
393 |
+
$Captions[$i] = $Ts['artists'][$i];
|
394 |
+
$IMGs[$i] = $Ts['images'][$i];
|
395 |
+
$IURLs[$i] = $Ts['imgurls'][$i];
|
396 |
+
$Order[] = $i;
|
397 |
+
}
|
398 |
+
}
|
399 |
+
$n = count($Files);
|
400 |
+
return array( 'artists' => $Captions, 'titles' => $Titles, 'files' => $Files, 'order' => $Order, 'count' => $n, 'images' => $IMGs, 'imgurls' => $IURLs );
|
401 |
+
}
|
402 |
+
|
403 |
+
/* Writes jPlayer
|
404 |
+
div if needed */
|
405 |
+
function write_jp_div() {
|
406 |
+
//if ( !$this->JPdiv ) {
|
407 |
+
// echo "\n<div id=\"mp3_jplayer_items\" style=\"position:relative;overflow:hidden;\">\n\t<div id=\"mp3_jplayer_1_8\" style=\"left:-999em;\"></div>\n</div>\n";
|
408 |
+
// $this->JPdiv = true;
|
409 |
+
// $this->dbug['str'] .= "\n(Added jp div)";
|
410 |
+
//}
|
411 |
+
}
|
412 |
+
|
413 |
+
/* Picks a random selection of n tracks from
|
414 |
+
the playlist while preserving track running order. */
|
415 |
+
function pick_from_playlist( $slicesize, $plist ) {
|
416 |
+
$no = trim($slicesize);
|
417 |
+
if ( $no > $plist['count'] ) { $no = $plist['count']; }
|
418 |
+
$order = $plist['order'];
|
419 |
+
shuffle($order);
|
420 |
+
$order = array_slice($order, 0, $no);
|
421 |
+
natsort($order);
|
422 |
+
$plist['order'] = array_values($order);
|
423 |
+
$plist['count'] = count($plist['order']);
|
424 |
+
return $plist;
|
425 |
+
}
|
426 |
+
|
427 |
+
/* Looks for any active widget that isn't ruled out by
|
428 |
+
the page filter. Returns true if finds a widget that will be building. */
|
429 |
+
function has_allowed_widget( $type ) {
|
430 |
+
|
431 |
+
//$SBsettings = get_option('sidebars_widgets');
|
432 |
+
global $_wp_sidebars_widgets;
|
433 |
+
if ( empty($_wp_sidebars_widgets) ) {
|
434 |
+
$SBsettings = get_option('sidebars_widgets', array());
|
435 |
+
} else {
|
436 |
+
$SBsettings = $_wp_sidebars_widgets;
|
437 |
+
}
|
438 |
+
if ( empty($SBsettings) || is_null($SBsettings) ) { return false; }
|
439 |
+
|
440 |
+
$active = array();
|
441 |
+
$scripts = false;
|
442 |
+
foreach ( $SBsettings as $key => $arr ) {
|
443 |
+
if ( is_array($arr) && $key != "wp_inactive_widgets" ) {
|
444 |
+
foreach ( $arr as $i => $widget ) {
|
445 |
+
if ( strchr($widget, $type) ) {
|
446 |
+
$active[] = $widget;
|
447 |
+
}
|
448 |
+
}
|
449 |
+
}
|
450 |
+
}
|
451 |
+
|
452 |
+
$this->dbug['arr'][] = $active;
|
453 |
+
|
454 |
+
if ( !empty($active) ) {
|
455 |
+
$name = "widget_". $type;
|
456 |
+
$ops = get_option($name);
|
457 |
+
foreach ( $active as $i => $widget ) {
|
458 |
+
$wID = strrchr( $widget, "-" );
|
459 |
+
$wID = str_replace( "-", "", $wID );
|
460 |
+
foreach ( $ops as $j => $arr ) {
|
461 |
+
if ( $j == $wID ) {
|
462 |
+
if ( !$this->page_filter($arr['restrict_list'], $arr['restrict_mode']) ) {
|
463 |
+
$scripts = true;
|
464 |
+
break 2;
|
465 |
+
}
|
466 |
+
}
|
467 |
+
}
|
468 |
+
}
|
469 |
+
}
|
470 |
+
return $scripts;
|
471 |
+
}
|
472 |
+
|
473 |
+
/* Builds mode-3 widget
|
474 |
+
playlist. */
|
475 |
+
function make_widget_playlist( $instance ) {
|
476 |
+
$Vs = array();
|
477 |
+
$Ks = array();
|
478 |
+
// Grab meta from ID
|
479 |
+
if ( !empty($instance['id_to_play']) && $instance['play_page'] == "true" ) {
|
480 |
+
$id = trim($instance['id_to_play']);
|
481 |
+
if ( ($meta = $this->meta_to_KVs($id)) ) {
|
482 |
+
$Vs = $meta['Vs'];
|
483 |
+
$Ks = $meta['Ks'];
|
484 |
+
}
|
485 |
+
}
|
486 |
+
// Add library
|
487 |
+
if ( $instance['play_library'] == "true" ) {
|
488 |
+
$library = $this->grab_library_info();
|
489 |
+
if ( $library['count'] >= 1 ) {
|
490 |
+
foreach ( $library['filenames'] as $i => $v ) {
|
491 |
+
$Vs[] = $v;
|
492 |
+
$Ks[] = $library['excerpts'][$i];
|
493 |
+
}
|
494 |
+
}
|
495 |
+
}
|
496 |
+
// Add a local folder
|
497 |
+
if ( $instance['play_folder'] == "true" ) {
|
498 |
+
$folder = ( $instance['folder_to_play'] == "" ) ? $this->theSettings['mp3_dir'] : $instance['folder_to_play'];
|
499 |
+
$tracks = $this->grab_local_folder_mp3s( $folder );
|
500 |
+
if ( $tracks !== true && $tracks !== false && count($tracks) > 0 ) {
|
501 |
+
foreach ( $tracks as $i => $v ) {
|
502 |
+
$Vs[] = $v;
|
503 |
+
$Ks[] = "";
|
504 |
+
}
|
505 |
+
}
|
506 |
+
}
|
507 |
+
if ( count($Vs) < 1 ) { return false; }
|
508 |
+
// Make the playlist
|
509 |
+
$thePlayList = $this->generate_playlist( $Ks, $Vs );
|
510 |
+
if ( $thePlayList['count'] < 1 ) { return false; }
|
511 |
+
return $thePlayList;
|
512 |
+
}
|
513 |
+
|
514 |
+
|
515 |
+
/* Checks current page against widget page-filter settings.
|
516 |
+
returns true if widget should be filtered out. */
|
517 |
+
function page_filter( $list, $mode ) {
|
518 |
+
$f = false;
|
519 |
+
if ( !empty($list) ) {
|
520 |
+
$pagelist = explode( ",", $list );
|
521 |
+
if ( !empty($pagelist) ) {
|
522 |
+
foreach ( $pagelist as $i => $id ) {
|
523 |
+
$pagelist[$i] = str_replace( " ", "", $id );
|
524 |
+
}
|
525 |
+
}
|
526 |
+
if ( !is_singular() ) { //look for 'index' or 'archive' or 'search'
|
527 |
+
if ( $mode == "include" ) {
|
528 |
+
if ( is_home() ) {
|
529 |
+
if ( strpos($list, "index") === false ) { $f = true; }
|
530 |
+
}
|
531 |
+
if ( is_archive() ) {
|
532 |
+
if ( strpos($list, "archive") === false ) { $f = true; }
|
533 |
+
}
|
534 |
+
if ( is_search() ) {
|
535 |
+
if ( strpos($list, "search") === false ) { $f = true; }
|
536 |
+
}
|
537 |
+
}
|
538 |
+
if ( $mode == "exclude" ) {
|
539 |
+
if ( is_home() ) {
|
540 |
+
if ( strpos($list, "index") !== false ) { $f = true; }
|
541 |
+
}
|
542 |
+
if ( is_archive() ) {
|
543 |
+
if ( strpos($list, "archive") !== false ) { $f = true; }
|
544 |
+
}
|
545 |
+
if ( is_search() ) {
|
546 |
+
if ( strpos($list, "search") !== false ) { $f = true; }
|
547 |
+
}
|
548 |
+
}
|
549 |
+
} else { //check the id's against current page
|
550 |
+
global $post;
|
551 |
+
$thisID = $post->ID;
|
552 |
+
if ( $mode == "include" ) {
|
553 |
+
$f = true;
|
554 |
+
foreach ( $pagelist as $i => $id ) {
|
555 |
+
if ( $id == $thisID ) { $f = false; }
|
556 |
+
}
|
557 |
+
|
558 |
+
if ( is_single() ) {
|
559 |
+
if ( strpos($list, "post") !== false ) {
|
560 |
+
$f = false;
|
561 |
+
}
|
562 |
+
}
|
563 |
+
}
|
564 |
+
if ( $mode == "exclude" ) {
|
565 |
+
foreach ( $pagelist as $i => $id ) {
|
566 |
+
if ( $id == $thisID ) { $f = true; }
|
567 |
+
}
|
568 |
+
|
569 |
+
if ( is_single() ) {
|
570 |
+
if ( strpos($list, "post") !== false ) {
|
571 |
+
$f = true;
|
572 |
+
}
|
573 |
+
}
|
574 |
+
}
|
575 |
+
}
|
576 |
+
}
|
577 |
+
return $f;
|
578 |
+
}
|
579 |
+
|
580 |
+
|
581 |
+
/* Checks whether current post ID
|
582 |
+
content contains a shortcode. */
|
583 |
+
function has_shortcodes ( $shtype = "" ) {
|
584 |
+
global $wpdb;
|
585 |
+
global $post;
|
586 |
+
if ( empty($post->ID) ) {
|
587 |
+
return false;
|
588 |
+
}
|
589 |
+
$content = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE ID=" . $post->ID );
|
590 |
+
$con = $content[0]->post_content;
|
591 |
+
if ( $shtype != "" ) { //check for it
|
592 |
+
if ( strpos($con, $shtype) !== false ) {
|
593 |
+
return true;
|
594 |
+
}
|
595 |
+
} else { //check for all player making shortcodes
|
596 |
+
if ( strpos($con, "[mp3-jplayer") !== false || strpos($con, "[mp3j") !== false || strpos($con, "[mp3t") !== false || strpos($con, "[mp3-popout") !== false ) {
|
597 |
+
return true;
|
598 |
+
}
|
599 |
+
}
|
600 |
+
return false;
|
601 |
+
}
|
602 |
+
|
603 |
+
/* Checks for a string in post content */
|
604 |
+
function post_has_string ( $str = "" ) {
|
605 |
+
global $wpdb;
|
606 |
+
global $post;
|
607 |
+
if ( empty($post->ID) ) {
|
608 |
+
return false;
|
609 |
+
}
|
610 |
+
$content = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE ID=" . $post->ID );
|
611 |
+
$con = $content[0]->post_content;
|
612 |
+
if ( strpos($con, $str) !== false ) {
|
613 |
+
return true;
|
614 |
+
}
|
615 |
+
return false;
|
616 |
+
}
|
617 |
+
|
618 |
+
|
619 |
+
/* Swaps out links for player
|
620 |
+
shortcodes, hooked to the_content. */
|
621 |
+
function replace_links ( $stuff = '' ) {
|
622 |
+
if ( ( is_home() || is_archive() || is_search() ) && $this->theSettings['player_onblog'] == "false" ) {
|
623 |
+
return $stuff;
|
624 |
+
}
|
625 |
+
$needles = array( '\"', '{TEXT}', '{URL}' );
|
626 |
+
$replacers = array( '"', '$5', '$2' );
|
627 |
+
$remove = "/<a ([^=]+=['\"][^\"']+['\"] )*href=['\"](([^\"']+\.mp3))['\"]( [^=]+=['\"][^\"']+['\"])*>([^<]+)<\/a>/i";
|
628 |
+
$add = str_replace($needles, $replacers, $this->theSettings['make_player_from_link_shcode'] );
|
629 |
+
|
630 |
+
return preg_replace( $remove, $add, $stuff );
|
631 |
+
}
|
632 |
+
|
633 |
+
|
634 |
+
/* Enqueues js and css scripts. */
|
635 |
+
function add_Scripts( $theme ) {
|
636 |
+
$version = substr( get_bloginfo('version'), 0, 3);
|
637 |
+
//jquery and jquery-ui
|
638 |
+
if ( $this->theSettings['disable_jquery_libs'] != "yes" ) {
|
639 |
+
if ( $version >= 3.1 ) {
|
640 |
+
wp_enqueue_script( 'jquery-ui-slider', $this->PluginFolder . '/js/ui.slider.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse' ), '1.8.10' );
|
641 |
+
} else { //pre WP 3.1
|
642 |
+
wp_enqueue_script( 'jquery-ui-widget', $this->PluginFolder . '/js/ui.widget.js', array( 'jquery', 'jquery-ui-core' ), '1.8.10' );
|
643 |
+
wp_enqueue_script( 'jquery-ui-mouse', $this->PluginFolder . '/js/ui.mouse.js', false, '1.8.10' );
|
644 |
+
wp_enqueue_script( 'jquery-ui-slider', $this->PluginFolder . '/js/ui.slider.js', false, '1.8.10' );
|
645 |
+
}
|
646 |
+
if ( $this->theSettings['touch_punch_js'] == "true" ) { // add ui patch for touch screens
|
647 |
+
wp_enqueue_script( 'jquery-touch-punch', $this->PluginFolder . '/js/jquery.ui.touch-punch.min.js', false, '0.2.2' );
|
648 |
+
}
|
649 |
+
$this->dbug['str'] .= "\nScript request added (jQuery & UI)"; //TODO sort 1st thing in dbug!
|
650 |
+
} else {
|
651 |
+
$this->dbug['str'] .= "\nScripts are OFF (jQuery & UI)";
|
652 |
+
}
|
653 |
+
//jplayer and plugin js
|
654 |
+
//wp_enqueue_script( 'jquery.jplayer.min', $this->PluginFolder . '/js/jquery.jplayer.min2-6-0.js', false, '2.6.0' );
|
655 |
+
wp_enqueue_script( 'jplayer271', $this->PluginFolder . '/js/jquery.jplayer.min.2.7.1.js', false, '2.7.1' );
|
656 |
+
wp_enqueue_script( 'mp3-jplayer', $this->PluginFolder . '/js/mp3-jplayer-1.8.10.js', false, '1.8.10' );
|
657 |
+
//css
|
658 |
+
if ( $theme == "styleF" ) { $themepath = $this->PluginFolder . "/css/players-1-8-silver.css"; }
|
659 |
+
elseif ( $theme == "styleG" ) { $themepath = $this->PluginFolder . "/css/players-1-8-dark.css"; }
|
660 |
+
elseif ( $theme == "styleH" ) { $themepath = $this->PluginFolder . "/css/players-1-8-text.css"; }
|
661 |
+
elseif ( $theme == "styleI" ) { $themepath = ( $this->theSettings['custom_stylesheet'] == "/" ) ? $this->newCSScustom : $this->theSettings['custom_stylesheet']; }
|
662 |
+
else { $themepath = $theme; }
|
663 |
+
$name = strrchr( $themepath, "/");
|
664 |
+
$name = str_replace( "/", "", $name);
|
665 |
+
$name = str_replace( ".css", "", $name);
|
666 |
+
wp_enqueue_style( $name, $themepath );
|
667 |
+
|
668 |
+
$this->dbug['str'] .= "\nScript request added (MP3-jPlayer and css)\n";
|
669 |
+
|
670 |
+
$this->write_user_style( $theme );
|
671 |
+
$this->PP_css_url = ( strpos($themepath, "http://") === false ) ? $this->WPinstallpath . $themepath : $themepath;
|
672 |
+
return;
|
673 |
+
}
|
674 |
+
|
675 |
+
|
676 |
+
/* Writes user colour settings, and
|
677 |
+
creates js property of popout css. */
|
678 |
+
function write_user_style( $theme ) {
|
679 |
+
$settings = $this->theSettings;
|
680 |
+
if ( $settings['use_fixed_css'] == "false" ) {
|
681 |
+
$pluginpath = $this->PluginFolder . "/";
|
682 |
+
$colours = $this->set_colours( $settings['colour_settings'], $theme, $pluginpath );
|
683 |
+
|
684 |
+
$screen_opac = "; opacity:" . $colours['screen_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['screen_opacity'] . ")";
|
685 |
+
$loaderbar_opac = "; opacity:" . $colours['loadbar_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['loadbar_opacity'] . ")";
|
686 |
+
$posbar_opac = "; opacity:" . $colours['posbar_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['posbar_opacity'] . ")";
|
687 |
+
$playlist_opac = "; opacity:" . $colours['playlist_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['playlist_opacity'] . ")";
|
688 |
+
|
689 |
+
switch( $colours['posbar_tint'] ) {
|
690 |
+
case "soften": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-soften-2.png') repeat-y right top"; break;
|
691 |
+
case "softenT": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-soften-tipped-2.png') repeat-y right top"; break;
|
692 |
+
case "darken": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-darken2-2.png') repeat-y right top"; break;
|
693 |
+
case "none": $posbar_tint = "";
|
694 |
+
}
|
695 |
+
switch( $colours['playlist_tint'] ) {
|
696 |
+
case "lighten1": $playlist_img = " url('" . $pluginpath . "css/images/pl-lighten1.png') repeat-x left 0px"; break;
|
697 |
+
case "lighten2": $playlist_img = " url('" . $pluginpath . "css/images/pl-lighten2.png') repeat-x left 0px"; break;
|
698 |
+
case "darken1": $playlist_img = " url('" . $pluginpath . "css/images/pl-gradlong10g.png') repeat-x left -130px"; break;
|
699 |
+
case "darken2": $playlist_img = " url('" . $pluginpath . "css/images/pl-darken1.png') repeat-x left 0px"; break;
|
700 |
+
case "none": $playlist_img = "transparent";
|
701 |
+
}
|
702 |
+
switch( $colours['list_divider'] ) {
|
703 |
+
case "light": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t60w.png') repeat-x left bottom"; break;
|
704 |
+
case "med": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t75e.png') repeat-x left bottom"; break;
|
705 |
+
case "dark": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t50g.png') repeat-x left bottom"; break;
|
706 |
+
case "none": $playlist_divider = "transparent; background-image:none";
|
707 |
+
}
|
708 |
+
|
709 |
+
$listBGa = "none";
|
710 |
+
$vol_grad = ( $colours['volume_grad'] == "light" ) ? "transparent url('" . $pluginpath . "css/images/vol-grad60w2.png') repeat-y -15px top" : "transparent url('" . $pluginpath . "css/images/vol-grad60b2.png') repeat-y 0px top";
|
711 |
+
$opac = ( $colours['indicator'] == "tint" ) ? "35" : "100";
|
712 |
+
$indicator = ( $colours['indicator'] == "tint" ) ? "#ccc" : $colours['posbar_colour'];
|
713 |
+
$gif_opac = "opacity:" . $opac*0.01 . "; filter:alpha(opacity=" . $opac . ")";
|
714 |
+
|
715 |
+
echo "\n\n<style type=\"text/css\">
|
716 |
+
div.jp-interface { color:" . $colours['screen_text_colour'] . "; }
|
717 |
+
div.innertab { background:" . $colours['screen_colour'] . $screen_opac . "; }
|
718 |
+
span.mp3-tint { background:" . $indicator . "; }
|
719 |
+
div.playlist-colour { background:" . $colours['playlist_colour'] . $playlist_opac . "; }
|
720 |
+
div.loadMI_mp3j, span.loadB_mp3j, span.load_mp3j { background:" . $colours['loadbar_colour'] . $loaderbar_opac . "; }
|
721 |
+
div.poscolMI_mp3j { background:" . $colours['posbar_colour'] . $posbar_tint . $posbar_opac ."; }
|
722 |
+
div.MIsliderVolume .ui-widget-header { background:" . $vol_grad . "; }
|
723 |
+
ul.UL-MI_mp3j { background:" . $playlist_img . " !important; }
|
724 |
+
ul.UL-MI_mp3j li { background:" . $playlist_divider . " !important; }
|
725 |
+
ul.UL-MI_mp3j li a { background-image:none !important; color:" . $colours['list_text_colour'] . " !important; }
|
726 |
+
ul.UL-MI_mp3j li a:hover { background-image:none !important; color:" . $colours['list_hover_colour'] . " !important; background:" . $colours['listBGa_hover'] . " !important; }
|
727 |
+
ul.UL-MI_mp3j li a.mp3j_A_current { background-image:none !important; color:" . $colours['list_current_colour'] . " !important; background:" . $colours['listBGa_current'] . " !important; }
|
728 |
+
span.mp3j-link-play, span.textbutton_mp3j:hover, div.transport-MI div { color:" . $colours['list_hover_colour'] . "; }
|
729 |
+
span.mp3j-link-play:hover, span.textbutton_mp3j, div.transport-MI div:hover { color:" . $colours['list_current_colour'] . "; }
|
730 |
+
div.transport-MI div, div.mp3j-popout-MI:hover { background-color:" . $colours['list_current_colour'] . "; }
|
731 |
+
.MI-image a:hover img { background:" . $colours['list_current_colour'] . ";}
|
732 |
+
</style>";
|
733 |
+
|
734 |
+
if ( $settings['enable_popout'] == "true" ) {
|
735 |
+
$popout_bg = ( $settings['popout_background'] == "" ) ? "#fff" : $settings['popout_background'];
|
736 |
+
$this->PP_css_settings = "
|
737 |
+
MP3_JPLAYER.popout_css = {
|
738 |
+
body_col: \"" . $popout_bg . "\",
|
739 |
+
body_img: \"" . $settings['popout_background_image'] . "\",
|
740 |
+
screen_bg: \"" . $colours['screen_colour'] . "\",
|
741 |
+
screen_opac: \"" . $colours['screen_opacity']*0.01 . "\",
|
742 |
+
screen_text: \"" . $colours['screen_text_colour'] . "\",
|
743 |
+
indi_tint: \"" . $indicator . "\",
|
744 |
+
loader_col: \"" . $colours['loadbar_colour'] . "\",
|
745 |
+
loader_opac: \"" . $colours['loadbar_opacity']*0.01 . "\",
|
746 |
+
posbar_col: \"" . $colours['posbar_colour'] . $posbar_tint . "\",
|
747 |
+
posbar_opac: \"" . $colours['posbar_opacity']*0.01 . "\",
|
748 |
+
vol_slider_bg: \"" . $vol_grad . "\",
|
749 |
+
list_col: \"" . $colours['playlist_colour'] . "\",
|
750 |
+
list_img: \"" . $playlist_img . "\",
|
751 |
+
list_opac: \"" . $colours['playlist_opacity']*0.01 . "\",
|
752 |
+
list_divider: \"" . $playlist_divider . "\",
|
753 |
+
list_text: \"" . $colours['list_text_colour'] . "\",
|
754 |
+
list_current_text: \"" . $colours['list_current_colour'] . "\",
|
755 |
+
list_hover_text: \"" . $colours['list_hover_colour'] . "\",
|
756 |
+
list_current_bg: \"" . $colours['listBGa_current'] . "\",
|
757 |
+
list_hover_bg: \"" . $colours['listBGa_hover'] . "\"
|
758 |
+
};";
|
759 |
+
|
760 |
+
}// end if enable popout
|
761 |
+
}// end if not fixed_css
|
762 |
+
return;
|
763 |
+
}
|
764 |
+
|
765 |
+
|
766 |
+
/* Sets up the colours array prior to writing
|
767 |
+
according to style / user colours / defaults. */
|
768 |
+
function set_colours( $current, $style, $pluginpath ) {
|
769 |
+
$silver = array( // defaults
|
770 |
+
'screen_colour' => '#a7a7a7', 'screen_opacity' => '35',
|
771 |
+
'loadbar_colour' => '#34A2D9', 'loadbar_opacity' => '70',
|
772 |
+
'posbar_colour' => '#5CC9FF', 'posbar_opacity' => '80', 'posbar_tint' => 'softenT',
|
773 |
+
'playlist_colour' => '#f1f1f1', 'playlist_opacity' => '100', 'playlist_tint' => 'darken1', 'list_divider' => 'med',
|
774 |
+
'screen_text_colour' => '#525252',
|
775 |
+
'list_text_colour' => '#525252', 'list_current_colour' => '#47ACDE', 'list_hover_colour' => '#768D99',
|
776 |
+
'listBGa_current' => '#f4f4f4', 'listBGa_hover' => '#f7f7f7',
|
777 |
+
'indicator' => 'colour',
|
778 |
+
'volume_grad' => 'light'
|
779 |
+
);
|
780 |
+
$darkgrey = array( // defaults
|
781 |
+
'screen_colour' => '#333', 'screen_opacity' => '15',
|
782 |
+
'loadbar_colour' => '#34A2D9', 'loadbar_opacity' => '70',
|
783 |
+
'posbar_colour' => '#5CC9FF', 'posbar_opacity' => '100', 'posbar_tint' => 'darken',
|
784 |
+
'playlist_colour' => '#fafafa', 'playlist_opacity' => '100', 'playlist_tint' => 'darken2', 'list_divider' => 'none',
|
785 |
+
'screen_text_colour' => '#525252',
|
786 |
+
'list_text_colour' => '#525252', 'list_current_colour' => '#34A2D9', 'list_hover_colour' => '#768D99',
|
787 |
+
'listBGa_current' => "transparent url('" . $pluginpath . "css/images/t40w.png') repeat", 'listBGa_hover' => "transparent url('" . $pluginpath . "css/images/t30w.png') repeat",
|
788 |
+
'indicator' => 'colour',
|
789 |
+
'volume_grad' => 'dark'
|
790 |
+
);
|
791 |
+
$text = array( // defaults
|
792 |
+
'screen_colour' => 'transparent', 'screen_opacity' => '100',
|
793 |
+
'loadbar_colour' => '#aaa', 'loadbar_opacity' => '20',
|
794 |
+
'posbar_colour' => '#fff', 'posbar_opacity' => '58', 'posbar_tint' => 'none',
|
795 |
+
'playlist_colour' => '#f6f6f6', 'playlist_opacity' => '100', 'playlist_tint' => 'lighten2', 'list_divider' => 'none',
|
796 |
+
'screen_text_colour' => '#869399',
|
797 |
+
'list_text_colour' => '#777', 'list_current_colour' => '#47ACDE', 'list_hover_colour' => '#829FAD',
|
798 |
+
'listBGa_current' => 'transparent', 'listBGa_hover' => 'transparent',
|
799 |
+
'indicator' => 'tint',
|
800 |
+
'volume_grad' => 'dark'
|
801 |
+
);
|
802 |
+
switch( $style ) {
|
803 |
+
case "styleG": $colours = $darkgrey; break;
|
804 |
+
case "styleH": $colours = $text; break;
|
805 |
+
default: $colours = $silver;
|
806 |
+
}
|
807 |
+
if ( !empty($current) ) {
|
808 |
+
foreach ( $current as $key => $val ) {
|
809 |
+
if ( $val != "" ) {
|
810 |
+
$colours[$key] = $val;
|
811 |
+
}
|
812 |
+
}
|
813 |
+
}
|
814 |
+
return $colours;
|
815 |
+
}
|
816 |
+
|
817 |
+
/* Makes js playlist array and stores it for echoing out in footer,
|
818 |
+
adds list name to js listref array */
|
819 |
+
function write_playlist_js( $list, $name = "noname", $numbering = false )
|
820 |
+
{
|
821 |
+
if ( $list['count'] < 1 )
|
822 |
+
{
|
823 |
+
return;
|
824 |
+
}
|
825 |
+
|
826 |
+
$copyF = $list['files'];
|
827 |
+
if ( $this->theSettings['encode_files'] == "true" )
|
828 |
+
{
|
829 |
+
foreach ( $list['files'] as $k => $file )
|
830 |
+
{
|
831 |
+
$list['files'][$k] = base64_encode($file);
|
832 |
+
}
|
833 |
+
}
|
834 |
+
$no = 1;
|
835 |
+
|
836 |
+
$js = $name . ": [";
|
837 |
+
foreach ( $list['order'] as $ik => $i ) {
|
838 |
+
$js .= "\n\t\t{ name: \"";
|
839 |
+
if ( $this->theSettings['add_track_numbering'] == "true" ) {
|
840 |
+
//$js .= $no . ". ";
|
841 |
+
$numdisplay = ( $numbering === false ) ? $no : $numbering;
|
842 |
+
$js .= $numdisplay . ". ";
|
843 |
+
}
|
844 |
+
|
845 |
+
|
846 |
+
$file = strrev( $copyF[$i] );
|
847 |
+
$format = strstr( $file, '.', true );
|
848 |
+
$format = strtolower ( $format );
|
849 |
+
$format = strrev ( $format );
|
850 |
+
if ( $format == 'mp4' )
|
851 |
+
{
|
852 |
+
$format = 'm4a';
|
853 |
+
}
|
854 |
+
if ( $this->FIRST_FORMATS == false )
|
855 |
+
{
|
856 |
+
$this->FIRST_FORMATS = $format;
|
857 |
+
}
|
858 |
+
|
859 |
+
//$js .= $list['titles'][$i]. "\", mp3: \"" .$list['files'][$i]. "\", artist: \"" .$list['artists'][$i]. "\", image: \"" .$list['images'][$i]. "\", imgurl: \"" .$list['imgurls'][$i]. "\" }";
|
860 |
+
$js .= $list['titles'][$i]. "\", formats: \"" . $format . "\", mp3: \"" .$list['files'][$i]. "\", artist: \"" .$list['artists'][$i]. "\", image: \"" .$list['images'][$i]. "\", imgurl: \"" .$list['imgurls'][$i]. "\" }";
|
861 |
+
|
862 |
+
if ( $no != $list['count'] ) {
|
863 |
+
$js .= ",";
|
864 |
+
}
|
865 |
+
$no++;
|
866 |
+
}
|
867 |
+
$js .= "\n\t]";
|
868 |
+
$this->JS['playlists'][] = $js;
|
869 |
+
$this->JS['listref'][] = $name;
|
870 |
+
//$c = count($this->JS['playlists']);
|
871 |
+
return;
|
872 |
+
}
|
873 |
+
|
874 |
+
|
875 |
+
////
|
876 |
+
////
|
877 |
+
////
|
878 |
+
|
879 |
+
function write_playlist_jsFORMATS( $list, $name = "noname", $numbering = false )
|
880 |
+
{
|
881 |
+
if ( $list['count'] < 1 )
|
882 |
+
{
|
883 |
+
return;
|
884 |
+
}
|
885 |
+
|
886 |
+
$copyF = $list['files'];
|
887 |
+
|
888 |
+
if ( $this->theSettings['encode_files'] == "true" )
|
889 |
+
{
|
890 |
+
foreach ( $list['files'] as $k => $file )
|
891 |
+
{
|
892 |
+
$list['files'][$k] = base64_encode($file);
|
893 |
+
$list['oggs'][$k] = base64_encode($list['oggs'][$k]);
|
894 |
+
}
|
895 |
+
}
|
896 |
+
$no = 1;
|
897 |
+
|
898 |
+
$js = $name . ": [";
|
899 |
+
foreach ( $list['order'] as $ik => $i )
|
900 |
+
{
|
901 |
+
$js .= "\n\t\t{ name: \"";
|
902 |
+
if ( $this->theSettings['add_track_numbering'] == "true" )
|
903 |
+
{
|
904 |
+
$numdisplay = ( $numbering === false ) ? $no : $numbering;
|
905 |
+
$js .= $numdisplay . ". ";
|
906 |
+
}
|
907 |
+
|
908 |
+
$file = strrev( $copyF[$i] );
|
909 |
+
$format = strstr( $file, '.', true );
|
910 |
+
$format = strtolower ( $format );
|
911 |
+
$format = strrev ( $format );
|
912 |
+
if ( $format == 'mp4' )
|
913 |
+
{
|
914 |
+
$format = 'm4a';
|
915 |
+
}
|
916 |
+
if ( $list['oggs'][$i] !== "" )
|
917 |
+
{
|
918 |
+
$format .= ', oga';
|
919 |
+
}
|
920 |
+
if ( $this->FIRST_FORMATS == false )
|
921 |
+
{
|
922 |
+
$this->FIRST_FORMATS = $format;
|
923 |
+
}
|
924 |
+
|
925 |
+
$js .= $list['titles'][$i]. "\", formats: \"" . $format . "\", mpeg: \"" .$list['files'][$i]. "\", ogg: \"" .$list['oggs'][$i]. "\", artist: \"" .$list['artists'][$i]. "\", image: \"" .$list['images'][$i]. "\", imgurl: \"" .$list['imgurls'][$i]. "\" }";
|
926 |
+
|
927 |
+
if ( $no != $list['count'] )
|
928 |
+
{
|
929 |
+
$js .= ",";
|
930 |
+
}
|
931 |
+
|
932 |
+
$no++;
|
933 |
+
}
|
934 |
+
$js .= "\n\t]";
|
935 |
+
|
936 |
+
$this->JS['playlists'][] = $js;
|
937 |
+
$this->JS['listref'][] = $name;
|
938 |
+
//$c = count($this->JS['playlists']);
|
939 |
+
|
940 |
+
return;
|
941 |
+
}
|
942 |
+
|
943 |
+
|
944 |
+
|
945 |
+
|
946 |
+
|
947 |
+
|
948 |
+
|
949 |
+
|
950 |
+
|
951 |
+
|
952 |
+
|
953 |
+
|
954 |
+
|
955 |
+
|
956 |
+
|
957 |
+
|
958 |
+
|
959 |
+
|
960 |
+
|
961 |
+
|
962 |
+
|
963 |
+
|
964 |
+
|
965 |
+
|
966 |
+
/* Writes [mp3-jplayer]
|
967 |
+
player html */
|
968 |
+
function write_primary_player( $pID, $pos, $width, $addclass, $dload_html, $title = "", $play_h, $stop_h, $prevnext, $height = "", $list, $npl_count, $cssclass = "" ) {
|
969 |
+
$pad_t = $this->theSettings['paddings_top'];
|
970 |
+
$pad_b = $this->theSettings['paddings_bottom'];
|
971 |
+
$pad_i = $this->theSettings['paddings_inner'];
|
972 |
+
if ( $pos == "left" ) {
|
973 |
+
$floater = "float:left; padding:" . $pad_t . " " . $pad_i . " " . $pad_b . " 0px;";
|
974 |
+
} else if ( $pos == "right" ) {
|
975 |
+
$floater = "float:right; padding:" . $pad_t . " 0px " . $pad_b . " " . $pad_i . ";";
|
976 |
+
} else if ( $pos == "absolute" ) {
|
977 |
+
$floater = "position:absolute;";
|
978 |
+
} else if ( $pos == "rel-C" ) {
|
979 |
+
$floater = "position:relative; padding:" . $pad_t . " 0px " . $pad_b . " 0px; margin:0px auto 0px auto;";
|
980 |
+
} else if ( $pos == "rel-R" ) {
|
981 |
+
$floater = "position:relative; padding:" . $pad_t . " 0px " . $pad_b . " 0px; margin:0px 0px 0px auto;";
|
982 |
+
} else {
|
983 |
+
$floater = "position: relative; padding:" . $pad_t . " 0px " . $pad_b . " 0px; margin:0px;";
|
984 |
+
}
|
985 |
+
$width = ( $width == "" ) ? " width:" . $this->theSettings['player_width'] . ";" : " width:" . $width . ";";
|
986 |
+
$height = ( !empty($height) && $height != "" ) ? " style=\"height:" . $height . ";\"" : ""; //will just use css sheet setting if empty
|
987 |
+
$title = ( $title == "" ) ? "" : "<h2>" . $title . "</h2>";
|
988 |
+
$Tpad = ( $this->theSettings['add_track_numbering'] == "false" ) ? " style=\"padding-left:6px;\"" : "";
|
989 |
+
$showpopoutbutton = ( $this->theSettings['enable_popout'] == "true" ) ? "visibility: visible;" : "visibility: hidden;";
|
990 |
+
$popouttext = ( $this->theSettings['player_theme'] == "styleH" && $this->theSettings['popout_button_title'] == "") ? "Pop-Out" : $this->theSettings['popout_button_title'];
|
991 |
+
$PLscroll = ( $this->theSettings['max_list_height'] != "" ) ? " style=\"overflow:auto; max-height:" . $this->theSettings['max_list_height'] . "px;\"" : "";
|
992 |
+
$list = ( $list == "true" ) ? "HIDE" : "SHOW";
|
993 |
+
$listtog_html = ( $npl_count > 1 ) ? "<div class=\"playlist-toggle-MI" . $addclass . "\" id=\"playlist-toggle_" . $pID. "\">" . $list . " PLAYLIST</div>" : "";
|
994 |
+
|
995 |
+
$img_html = '<div class="MI-image" id="MI_image_' . $pID . '"></div>';
|
996 |
+
|
997 |
+
$dlframe = '
|
998 |
+
<div id="mp3j_finfo_' . $pID . '" class="mp3j-finfo" style="display:none;">
|
999 |
+
<div class="mp3j-finfo-sleeve">
|
1000 |
+
<div id="mp3j_finfo_gif_' . $pID . '" class="mp3j-finfo-gif"></div>
|
1001 |
+
<div id="mp3j_finfo_txt_' . $pID . '" class="mp3j-finfo-txt"></div>
|
1002 |
+
<div class="mp3j-finfo-close" id="mp3j_finfo_close_' . $pID . '">X</div>
|
1003 |
+
</div>
|
1004 |
+
</div>
|
1005 |
+
<div id="mp3j_dlf_' . $pID . '" class="mp3j-dlframe" style="display:none;"></div>';
|
1006 |
+
|
1007 |
+
$dlframe_html = ( $this->theSettings['force_browser_dload'] == "true" ) ? $dlframe : "";
|
1008 |
+
|
1009 |
+
$list_html = "
|
1010 |
+
<div class=\"listwrap_mp3j\" id=\"L_mp3j_" . $pID . "\"" . $PLscroll . ">
|
1011 |
+
<div class=\"playlist-wrap-MI\">
|
1012 |
+
<div class=\"playlist-colour\"></div>
|
1013 |
+
<div class=\"playlist-wrap-MI\">
|
1014 |
+
<ul class=\"UL-MI_mp3j" . $addclass . "\" id=\"UL_mp3j_" . $pID . "\"><li></li></ul>
|
1015 |
+
</div>
|
1016 |
+
</div>
|
1017 |
+
</div>";
|
1018 |
+
|
1019 |
+
$player = "\n
|
1020 |
+
<div id=\"wrapperMI_" . $pID . "\" class=\"wrap-MI " . $cssclass . "\" style=\"" . $floater . $width . "\">" . $title . "
|
1021 |
+
<div class=\"jp-innerwrap\">
|
1022 |
+
<div class=\"innerx\"></div>
|
1023 |
+
<div class=\"innerleft\"></div>
|
1024 |
+
<div class=\"innerright\"></div>
|
1025 |
+
<div class=\"innertab\"></div>\n
|
1026 |
+
<div class=\"jp-interface\"" . $height . " id=\"interfaceMI_" . $pID . "\">
|
1027 |
+
" . $img_html . "
|
1028 |
+
<div id=\"T_mp3j_" . $pID . "\" class=\"player-track-title" . $addclass . "\"" . $Tpad . "></div>
|
1029 |
+
<div class=\"MIsliderVolume\" id=\"vol_mp3j_" . $pID . "\"></div>
|
1030 |
+
<div class=\"bars_holder\">
|
1031 |
+
<div class=\"loadMI_mp3j\" id=\"load_mp3j_" . $pID . "\"></div>
|
1032 |
+
<div class=\"poscolMI_mp3j\" id=\"poscol_mp3j_" . $pID . "\"></div>
|
1033 |
+
<div class=\"posbarMI_mp3j\" id=\"posbar_mp3j_" . $pID . "\"></div>
|
1034 |
+
</div>
|
1035 |
+
<div id=\"P-Time-MI_" . $pID . "\" class=\"jp-play-time\"></div>
|
1036 |
+
<div id=\"T-Time-MI_" . $pID . "\" class=\"jp-total-time\"></div>
|
1037 |
+
<div id=\"statusMI_" . $pID . "\" class=\"statusMI" . $addclass . "\"></div>
|
1038 |
+
<div class=\"transport-MI\">" . $play_h . $stop_h . $prevnext . "</div>
|
1039 |
+
" . $dload_html . "
|
1040 |
+
" . $listtog_html . "
|
1041 |
+
" . $dlframe_html . "
|
1042 |
+
<div class=\"mp3j-popout-MI" . $addclass . "\" id=\"lpp_mp3j_" . $pID. "\" style=\"" .$showpopoutbutton. "\">" . $popouttext . "</div>
|
1043 |
+
</div>
|
1044 |
+
</div>
|
1045 |
+
" . $list_html . "
|
1046 |
+
<div class=\"mp3j-nosolution\" id=\"mp3j_nosolution_" . $pID . "\" style=\"display:none;\"></div>
|
1047 |
+
</div>\n";
|
1048 |
+
|
1049 |
+
return $player;
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
/* Stores and returns
|
1053 |
+
updated compatible options. */
|
1054 |
+
function getAdminOptions()
|
1055 |
+
{
|
1056 |
+
$colour_keys = array(
|
1057 |
+
'screen_colour' => '',
|
1058 |
+
'screen_opacity' => '',
|
1059 |
+
'loadbar_colour' => '',
|
1060 |
+
'loadbar_opacity' => '',
|
1061 |
+
'posbar_colour' => '',
|
1062 |
+
'posbar_opacity' => '',
|
1063 |
+
'posbar_tint' => '',
|
1064 |
+
'playlist_colour' => '',
|
1065 |
+
'playlist_opacity' => '',
|
1066 |
+
'playlist_tint' => '',
|
1067 |
+
'list_divider' => '',
|
1068 |
+
'screen_text_colour' => '',
|
1069 |
+
'list_text_colour' => '',
|
1070 |
+
'list_current_colour' => '',
|
1071 |
+
'list_hover_colour' => '',
|
1072 |
+
'listBGa_current' => '',
|
1073 |
+
'listBGa_hover' => '',
|
1074 |
+
'indicator' => '',
|
1075 |
+
'volume_grad' => ''
|
1076 |
+
);
|
1077 |
+
|
1078 |
+
$mp3FoxAdminOptions = array( // defaults
|
1079 |
+
'initial_vol' => '100',
|
1080 |
+
'auto_play' => 'false',
|
1081 |
+
'mp3_dir' => '/',
|
1082 |
+
'player_theme' => 'styleF',
|
1083 |
+
'allow_remoteMp3' => 'true',
|
1084 |
+
'player_float' => 'none',
|
1085 |
+
'player_onblog' => 'true',
|
1086 |
+
'playlist_show' => 'true',
|
1087 |
+
'remember_settings' => 'true',
|
1088 |
+
'hide_mp3extension' => 'false',
|
1089 |
+
'show_downloadmp3' => 'false',
|
1090 |
+
'disable_template_tag' => 'false',
|
1091 |
+
'db_plugin_version' => $this->version_of_plugin,
|
1092 |
+
'custom_stylesheet' => $this->newCSScustom,
|
1093 |
+
'echo_debug' => 'false',
|
1094 |
+
'add_track_numbering' => 'false',
|
1095 |
+
'enable_popout' => 'true',
|
1096 |
+
'playlist_repeat' => 'false',
|
1097 |
+
'player_width' => '40%',
|
1098 |
+
'popout_background' => '',
|
1099 |
+
'popout_background_image' => '',
|
1100 |
+
'colour_settings' => $colour_keys,
|
1101 |
+
'use_fixed_css' => 'false',
|
1102 |
+
'paddings_top' => '5px',
|
1103 |
+
'paddings_bottom' => '40px',
|
1104 |
+
'paddings_inner' => '35px',
|
1105 |
+
'popout_max_height' => '600',
|
1106 |
+
'popout_width' => '400',
|
1107 |
+
'popout_button_title' => '',
|
1108 |
+
'max_list_height' => '450',
|
1109 |
+
'encode_files' => 'true',
|
1110 |
+
'animate_sliders' => 'false',
|
1111 |
+
'library_sortcol' => 'filename',
|
1112 |
+
'library_direction' => 'ASC',
|
1113 |
+
'disable_jquery_libs' => '',
|
1114 |
+
'run_shcode_in_excerpt' => 'false',
|
1115 |
+
'admin_toggle_1' => 'false',
|
1116 |
+
'f_separator' => ',',
|
1117 |
+
'c_separator' => ';',
|
1118 |
+
'volslider_on_singles' => 'false',
|
1119 |
+
'volslider_on_mp3j' => 'false',
|
1120 |
+
'dload_text' => 'DOWNLOAD MP3',
|
1121 |
+
'loggedout_dload_text' => 'LOG IN TO DOWNLOAD',
|
1122 |
+
'loggedout_dload_link' => $this->WPinstallpath . '/wp-login.php',
|
1123 |
+
'touch_punch_js' => 'true',
|
1124 |
+
'force_browser_dload' => 'true',
|
1125 |
+
'dloader_remote_path' => '',
|
1126 |
+
'make_player_from_link' => 'true',
|
1127 |
+
'make_player_from_link_shcode' => '[mp3j track="{TEXT}@{URL}" volslider="y" style="outline"]'
|
1128 |
+
);
|
1129 |
+
|
1130 |
+
$theOptions = get_option($this->adminOptionsName);
|
1131 |
+
|
1132 |
+
if ( ! empty($theOptions) )
|
1133 |
+
{
|
1134 |
+
if ( $theOptions['db_plugin_version'] !== $this->version_of_plugin ) //do compat
|
1135 |
+
{
|
1136 |
+
//backwards compat with v1.4 style
|
1137 |
+
$xfer = $this->transfer_old_colours( $theOptions['player_theme'], $colour_keys, $theOptions['custom_stylesheet'] );
|
1138 |
+
if ( $xfer[0] )
|
1139 |
+
{
|
1140 |
+
$theOptions['player_theme'] = $xfer[0];
|
1141 |
+
$theOptions['custom_stylesheet'] = $xfer[2];
|
1142 |
+
}
|
1143 |
+
//ditch un-needed stored settings
|
1144 |
+
foreach ( $theOptions as $key => $option )
|
1145 |
+
{
|
1146 |
+
if ( array_key_exists( $key, $mp3FoxAdminOptions) )
|
1147 |
+
{
|
1148 |
+
$mp3FoxAdminOptions[$key] = $option;
|
1149 |
+
}
|
1150 |
+
}
|
1151 |
+
$mp3FoxAdminOptions['db_plugin_version'] = $this->version_of_plugin; //set last!
|
1152 |
+
update_option($this->adminOptionsName, $mp3FoxAdminOptions);
|
1153 |
+
}
|
1154 |
+
else
|
1155 |
+
{
|
1156 |
+
$mp3FoxAdminOptions = $theOptions;
|
1157 |
+
}
|
1158 |
+
}
|
1159 |
+
else //save new defaults
|
1160 |
+
{
|
1161 |
+
update_option($this->adminOptionsName, $mp3FoxAdminOptions);
|
1162 |
+
}
|
1163 |
+
|
1164 |
+
return $mp3FoxAdminOptions;
|
1165 |
+
}
|
1166 |
+
|
1167 |
+
|
1168 |
+
/* translates colour style from old options
|
1169 |
+
to the 1.7 format prior to saving them. */
|
1170 |
+
function transfer_old_colours ( $s, $keys, $path = "" ) {
|
1171 |
+
$csspath = $this->PluginFolder . "/css/mp3jplayer-cyanALT.css"; //orig alternative stylesheet name in v1.4.x
|
1172 |
+
$path = ( $path == $csspath || $path == "" ) ? $this->newCSScustom : $path;
|
1173 |
+
if ( $s == "styleA" ) { //orig 'neutral'
|
1174 |
+
$s = "styleF";
|
1175 |
+
} elseif ( $s == "styleB" ) { //orig 'green'
|
1176 |
+
$s = "styleF";
|
1177 |
+
} elseif ( $s == "styleC" ) { //orig 'blu'
|
1178 |
+
$s = "styleF";
|
1179 |
+
} elseif ( $s == "styleD" ) { //orig 'cyanALT', or custom css
|
1180 |
+
$s = "styleI";
|
1181 |
+
} elseif ( $s == "styleE" ) { //orig 'text'
|
1182 |
+
$s = "styleH";
|
1183 |
+
} else {
|
1184 |
+
$s = false;
|
1185 |
+
}
|
1186 |
+
return array( $s, $keys, $path );
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
/* Adds css to settings page. */
|
1190 |
+
function mp3j_admin_header()
|
1191 |
+
{
|
1192 |
+
echo "\n<link rel=\"stylesheet\" href=\"" . $this->PluginFolder . "/css/admin-1.8.css\" type=\"text/css\" media=\"screen\" />\n";
|
1193 |
+
}
|
1194 |
+
|
1195 |
+
/* Adds js to settings page. */
|
1196 |
+
function mp3j_admin_footer()
|
1197 |
+
{
|
1198 |
+
echo "\n<script type=\"text/javascript\" src=\"" . $this->PluginFolder . "/js/admin-1.8.js\"></script>";
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
|
1202 |
+
|
1203 |
+
function prep_value ( $field )
|
1204 |
+
{
|
1205 |
+
$search = array( "'", '"', '\\' );
|
1206 |
+
$option = str_replace( $search, "", $field );
|
1207 |
+
$option = strip_tags( $option );
|
1208 |
+
return $option;
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
|
1212 |
+
|
1213 |
+
function prep_text ( $field )
|
1214 |
+
{
|
1215 |
+
$search = array(
|
1216 |
+
'@<script[^>]*?>.*?</script>@si', // Strip out javascript
|
1217 |
+
'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
|
1218 |
+
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA
|
1219 |
+
);
|
1220 |
+
|
1221 |
+
$text = preg_replace( $search, '', $field );
|
1222 |
+
return $text;
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
|
1226 |
+
function strip_scripts ( $field )
|
1227 |
+
{
|
1228 |
+
$search = array(
|
1229 |
+
'@<script[^>]*?>.*?</script>@si', // Strip out javascript
|
1230 |
+
'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
|
1231 |
+
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA
|
1232 |
+
);
|
1233 |
+
|
1234 |
+
$text = preg_replace( $search, '', $field );
|
1235 |
+
return $text;
|
1236 |
+
}
|
1237 |
+
|
1238 |
+
|
1239 |
+
|
1240 |
+
/* Preps path/uri option on settings page prior to saving. */
|
1241 |
+
function prep_path ( $field ) {
|
1242 |
+
|
1243 |
+
$search = array( "'", '"', ';', '\\' );
|
1244 |
+
$option = str_replace( $search, "", $field );
|
1245 |
+
$option = strip_tags( $option );
|
1246 |
+
$option = preg_replace( "!^www*\.!", "http://www.", $option ); //add default protocol if admin didn't
|
1247 |
+
|
1248 |
+
if ( strpos($option, "http://") === false && strpos($option, "https://") === false) { //if local path was entered
|
1249 |
+
|
1250 |
+
if (preg_match("!^/!", $option) == 0) { //if there was no starting slash then add one
|
1251 |
+
$option = "/" . $option;
|
1252 |
+
} else {
|
1253 |
+
$option = preg_replace("!^/+!", "/", $option); //or just make sure theres only one
|
1254 |
+
}
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
if (preg_match("!.+/+$!", $option) == 1) { //remove any ending slashes
|
1258 |
+
$option = preg_replace("!/+$!", "", $option);
|
1259 |
+
}
|
1260 |
+
if ($option == "") { //set to domain root
|
1261 |
+
$option = "/";
|
1262 |
+
}
|
1263 |
+
return $option;
|
1264 |
+
}
|
1265 |
+
|
1266 |
+
/* Debug output via mp3j_debug() or admin settings. */
|
1267 |
+
function debug_info( $display = "" ) {
|
1268 |
+
echo "\n\n<!-- *** MP3-jPlayer - " . "version " . $this->version_of_plugin . " ***\n";
|
1269 |
+
if ( is_singular() ) { echo "\nTemplate: Singular "; }
|
1270 |
+
if ( is_single() ) { echo "Post"; }
|
1271 |
+
if ( is_page() ) { echo "Page"; }
|
1272 |
+
if ( is_search() ) { echo "\nTemplate: Search"; }
|
1273 |
+
if ( is_home() ) { echo "\nTemplate: Posts index"; }
|
1274 |
+
if ( is_front_page() ) { echo " (Home page)"; }
|
1275 |
+
if ( is_archive() ) { echo "\nTemplate: Archive"; }
|
1276 |
+
echo "\nUse tags: ";
|
1277 |
+
if ( $this->theSettings['disable_template_tag'] == "false" ) {
|
1278 |
+
echo "Yes";
|
1279 |
+
} else {
|
1280 |
+
echo "No";
|
1281 |
+
}
|
1282 |
+
echo "\n" . $this->dbug['str'] . "\n";
|
1283 |
+
echo "\nPlayer count: " . $this->Player_ID;
|
1284 |
+
echo "\n\nAdmin Settings:\n";
|
1285 |
+
print_r($this->theSettings);
|
1286 |
+
$this->grab_library_info();
|
1287 |
+
echo "\nMP3's in Media Library: " . $this->LibraryI['count'];
|
1288 |
+
echo "\n\nOther arrays:\n";
|
1289 |
+
foreach ( $this->dbug['arr'] as $i => $a ) {
|
1290 |
+
if ( is_array($a) ) {
|
1291 |
+
echo "\n" . $i . "\n";
|
1292 |
+
print_r($a);
|
1293 |
+
}
|
1294 |
+
}
|
1295 |
+
echo "\n-->\n\n";
|
1296 |
+
return;
|
1297 |
+
}
|
1298 |
+
}} // close class, close if.
|
1299 |
+
?>
|
mp3j_sc-widget.php
CHANGED
@@ -70,7 +70,7 @@ if ( class_exists("WP_Widget") ) {
|
|
70 |
);
|
71 |
$instance = wp_parse_args( (array) $instance, $defaultvalues );
|
72 |
?>
|
73 |
-
<h3 style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="
|
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>
|
70 |
);
|
71 |
$instance = wp_parse_args( (array) $instance, $defaultvalues );
|
72 |
?>
|
73 |
+
<h3 style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="admin.php?page=mp3-jplayer">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>
|
mp3j_widget.php
CHANGED
@@ -225,7 +225,7 @@ if ( class_exists("WP_Widget") ) {
|
|
225 |
$helptext_col = "color:#a0a0a0;";
|
226 |
?>
|
227 |
|
228 |
-
<h3 style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="
|
229 |
<p style="margin-top:-18px; margin-bottom:10px;">Play Mode:</p>
|
230 |
<p style="margin-bottom: 10px;"><input type="radio" id="<?php echo $this->get_field_id( 'widget_mode' ); ?>" name="<?php echo $this->get_field_name( 'widget_mode' ); ?>" value="1" <?php if ($instance['widget_mode'] == "1") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
|
231 |
Mode 1 <span class="description" style="margin-left: 0px;">Custom fields</span>
|
225 |
$helptext_col = "color:#a0a0a0;";
|
226 |
?>
|
227 |
|
228 |
+
<h3 style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="admin.php?page=mp3-jplayer">Plugin Options & Help</a></h3>
|
229 |
<p style="margin-top:-18px; margin-bottom:10px;">Play Mode:</p>
|
230 |
<p style="margin-bottom: 10px;"><input type="radio" id="<?php echo $this->get_field_id( 'widget_mode' ); ?>" name="<?php echo $this->get_field_name( 'widget_mode' ); ?>" value="1" <?php if ($instance['widget_mode'] == "1") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
|
231 |
Mode 1 <span class="description" style="margin-left: 0px;">Custom fields</span>
|
mp3jplayer.php
CHANGED
@@ -1,119 +1,131 @@
|
|
1 |
-
<?php
|
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.
|
7 |
-
Author: Simon Ward
|
8 |
-
Author URI: http://www.sjward.org
|
9 |
-
License: GPL2
|
10 |
-
|
11 |
-
Copyright 2012 Simon Ward
|
12 |
-
|
13 |
-
This program is free software; you can redistribute it and/or modify
|
14 |
-
it under the terms of the GNU General Public License, version 2, as
|
15 |
-
published by the Free Software Foundation.
|
16 |
-
|
17 |
-
This program is distributed in the hope that it will be useful,
|
18 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
-
GNU General Public License for more details.
|
21 |
-
|
22 |
-
You should have received a copy of the GNU General Public License
|
23 |
-
along with this program; if not, write to the Free Software
|
24 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
-
*/
|
26 |
-
|
27 |
-
$mp3j_path = dirname(__FILE__);
|
28 |
-
include_once( $mp3j_path . '/mp3j_main.php');
|
29 |
-
include_once( $mp3j_path . '/mp3j_frontend.php'); //extends main
|
30 |
-
|
31 |
-
if ( class_exists("MP3j_Front") )
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
}
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
}
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
add_action('
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
?>
|
1 |
+
<?php
|
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.10
|
7 |
+
Author: Simon Ward
|
8 |
+
Author URI: http://www.sjward.org
|
9 |
+
License: GPL2
|
10 |
+
|
11 |
+
Copyright 2012 Simon Ward
|
12 |
+
|
13 |
+
This program is free software; you can redistribute it and/or modify
|
14 |
+
it under the terms of the GNU General Public License, version 2, as
|
15 |
+
published by the Free Software Foundation.
|
16 |
+
|
17 |
+
This program is distributed in the hope that it will be useful,
|
18 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
+
GNU General Public License for more details.
|
21 |
+
|
22 |
+
You should have received a copy of the GNU General Public License
|
23 |
+
along with this program; if not, write to the Free Software
|
24 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
+
*/
|
26 |
+
|
27 |
+
$mp3j_path = dirname(__FILE__);
|
28 |
+
include_once( $mp3j_path . '/mp3j_main.php');
|
29 |
+
include_once( $mp3j_path . '/mp3j_frontend.php'); //extends main
|
30 |
+
|
31 |
+
if ( class_exists("MP3j_Front") )
|
32 |
+
{
|
33 |
+
$mp3_fox = new MP3j_Front();
|
34 |
+
}
|
35 |
+
|
36 |
+
if ( isset($mp3_fox) )
|
37 |
+
{
|
38 |
+
include_once( $mp3j_path . '/mp3j_widget.php'); //ui widget
|
39 |
+
include_once( $mp3j_path . '/mp3j_sc-widget.php'); //sh Widget
|
40 |
+
|
41 |
+
if ( is_admin() )
|
42 |
+
{
|
43 |
+
include_once( $mp3j_path . '/mp3j_admin.php'); //settings page
|
44 |
+
include_once( $mp3j_path . '/help.php');
|
45 |
+
|
46 |
+
function mp3j_adminpage()
|
47 |
+
{
|
48 |
+
//add a settings menu page
|
49 |
+
global $mp3_fox;
|
50 |
+
$pluginpage = add_menu_page( 'Settings | MP3 jPlayer', 'MP3 jPlayer', 'manage_options', 'mp3-jplayer', 'mp3j_print_admin_page' );
|
51 |
+
add_submenu_page( 'mp3-jplayer', 'Settings | MP3 jPlayer', 'Settings', 'manage_options', 'mp3-jplayer', 'mp3j_print_admin_page' );
|
52 |
+
|
53 |
+
add_action( 'admin_head-'. $pluginpage, array(&$mp3_fox, 'mp3j_admin_header') );
|
54 |
+
add_action( 'admin_footer-'. $pluginpage, array(&$mp3_fox, 'mp3j_admin_footer') );
|
55 |
+
|
56 |
+
$subm_help = add_submenu_page( 'mp3-jplayer', 'Help | MP3 jPlayer', 'Help', 'manage_options', 'mp3-jplayer-help', 'mp3j_print_help_page' );
|
57 |
+
add_action( 'admin_head-'. $subm_help, array(&$mp3_fox, 'mp3j_admin_header') );
|
58 |
+
add_action( 'admin_footer-'. $subm_help, array(&$mp3_fox, 'mp3j_admin_footer') );
|
59 |
+
|
60 |
+
add_filter( 'plugin_action_links', 'mp3j_plugin_links', 10, 2 );
|
61 |
+
}
|
62 |
+
|
63 |
+
function mp3j_plugin_links( $links, $file )
|
64 |
+
{
|
65 |
+
//add a settings link on plugins page
|
66 |
+
if( $file == 'mp3-jplayer/mp3jplayer.php' ) {
|
67 |
+
$settings_link = '<a href="admin.php?page=mp3-jplayer">'.__('Settings').'</a>';
|
68 |
+
array_unshift( $links, $settings_link );
|
69 |
+
}
|
70 |
+
return $links;
|
71 |
+
}
|
72 |
+
|
73 |
+
add_action('deactivate_mp3-jplayer/mp3jplayer.php', array(&$mp3_fox, 'uninitFox'));
|
74 |
+
add_action('admin_menu', 'mp3j_adminpage');
|
75 |
+
}
|
76 |
+
|
77 |
+
// template tags
|
78 |
+
function mp3j_addscripts( $style = "" ) {
|
79 |
+
do_action('mp3j_addscripts', $style);
|
80 |
+
}
|
81 |
+
|
82 |
+
function mp3j_put( $shortcodes = "" ) {
|
83 |
+
do_action( 'mp3j_put', $shortcodes );
|
84 |
+
}
|
85 |
+
|
86 |
+
function mp3j_debug( $display = "" ) {
|
87 |
+
do_action('mp3j_debug', $display);
|
88 |
+
}
|
89 |
+
|
90 |
+
function mp3j_grab_library( $format = "" ) {
|
91 |
+
$lib = apply_filters('mp3j_grab_library', '' );
|
92 |
+
return $lib;
|
93 |
+
}
|
94 |
+
|
95 |
+
// widgets
|
96 |
+
function mp3jplayer_widget_init() {
|
97 |
+
register_widget( 'MP3_jPlayer' );
|
98 |
+
}
|
99 |
+
add_action( 'widgets_init', 'mp3jplayer_widget_init' );
|
100 |
+
|
101 |
+
function mp3jshortcodes_widget_init() {
|
102 |
+
register_widget( 'MP3j_single' ); //silly name but can't change it now!
|
103 |
+
}
|
104 |
+
add_action( 'widgets_init', 'mp3jshortcodes_widget_init' );
|
105 |
+
|
106 |
+
// shortcodes
|
107 |
+
add_shortcode('mp3t', array(&$mp3_fox, 'inline_play_handler'));
|
108 |
+
add_shortcode('mp3j', array(&$mp3_fox, 'inline_play_graphic'));
|
109 |
+
add_shortcode('mp3-jplayer', array(&$mp3_fox, 'primary_player'));
|
110 |
+
add_shortcode('mp3-popout', array(&$mp3_fox, 'popout_link_player'));
|
111 |
+
|
112 |
+
// template hooks
|
113 |
+
add_action('wp_head', array(&$mp3_fox, 'header_scripts_handler'), 2);
|
114 |
+
add_action('wp_footer', array(&$mp3_fox, 'footercode_handler'), 200); //process this late (enqueues are priority 20, must be after this!)
|
115 |
+
add_action('mp3j_put', array(&$mp3_fox, 'template_tag_handler'), 10, 1 );
|
116 |
+
add_action('mp3j_addscripts', array(&$mp3_fox, 'scripts_tag_handler'), 1, 1 );
|
117 |
+
add_filter('mp3j_grab_library', array(&$mp3_fox, 'grablibrary_handler'), 10, 1 );
|
118 |
+
add_action('mp3j_debug', array(&$mp3_fox, 'debug_info'), 10, 1 );
|
119 |
+
//add_action('mp3j_div', array(&$mp3_fox, 'write_jp_div'));
|
120 |
+
if ( $mp3_fox->theSettings['make_player_from_link'] == "true" ) {
|
121 |
+
add_filter('the_content', array(&$mp3_fox, 'replace_links'), 1);
|
122 |
+
}
|
123 |
+
|
124 |
+
// retired
|
125 |
+
function mp3j_set_meta( $tracks, $captions = "", $startnum = 1 ) { } //since 1.7
|
126 |
+
function mp3j_flag( $set = 1 ) { } //since 1.6
|
127 |
+
function mp3j_div() {
|
128 |
+
//do_action('mp3j_div');
|
129 |
+
}
|
130 |
+
}
|
131 |
?>
|
popout.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
<script type='text/javascript' src='js/jquery.jplayer.min.2.7.1.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.
|
17 |
|
18 |
<script type='text/javascript'>
|
19 |
|
@@ -98,9 +98,11 @@ jQuery(document).ready(function () {
|
|
98 |
</head>
|
99 |
<body style="padding:5px 4px 0px 4px; margin:0px;">
|
100 |
|
|
|
101 |
<div style="position:relative;overflow:hidden;">
|
102 |
<div id="mp3_jplayer_1_8" style="left:-999em;"></div>
|
103 |
</div>
|
|
|
104 |
|
105 |
<div class="wrap-MI" style="position:relative; padding:0; margin:0px auto 0px auto; width:100%;">
|
106 |
<div class="jp-innerwrap">
|
@@ -138,6 +140,7 @@ jQuery(document).ready(function () {
|
|
138 |
<div class="playlist-colour"></div>
|
139 |
<div class="playlist-wrap-MI"><ul class="UL-MI_mp3j" id="UL_mp3j_0"><li></li></ul></div>
|
140 |
</div>
|
|
|
141 |
</div>
|
142 |
|
143 |
<script type="text/javascript">
|
13 |
<script type='text/javascript' src='js/jquery.jplayer.min.2.7.1.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.10.js'></script>
|
17 |
|
18 |
<script type='text/javascript'>
|
19 |
|
98 |
</head>
|
99 |
<body style="padding:5px 4px 0px 4px; margin:0px;">
|
100 |
|
101 |
+
<!--
|
102 |
<div style="position:relative;overflow:hidden;">
|
103 |
<div id="mp3_jplayer_1_8" style="left:-999em;"></div>
|
104 |
</div>
|
105 |
+
-->
|
106 |
|
107 |
<div class="wrap-MI" style="position:relative; padding:0; margin:0px auto 0px auto; width:100%;">
|
108 |
<div class="jp-innerwrap">
|
140 |
<div class="playlist-colour"></div>
|
141 |
<div class="playlist-wrap-MI"><ul class="UL-MI_mp3j" id="UL_mp3j_0"><li></li></ul></div>
|
142 |
</div>
|
143 |
+
<div class="mp3j-nosolution" id="mp3j_nosolution_0" style="display:none;"></div>
|
144 |
</div>
|
145 |
|
146 |
<script type="text/javascript">
|
readme.txt
CHANGED
@@ -1 +1,304 @@
|
|
1 |
-
=== MP3-jPlayer ===
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== MP3-jPlayer ===
|
2 |
+
Author URI: http://www.sjward.org
|
3 |
+
Plugin URI: http://www.sjward.org/jplayer-for-wordpress
|
4 |
+
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: 4.0
|
9 |
+
Stable tag: 1.8.10
|
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 />
|
39 |
+
<br />
|
40 |
+
**Shortcodes - Basic usage**
|
41 |
+
|
42 |
+
[mp3j] and [mp3t] add single-track players
|
43 |
+
|
44 |
+
<br />
|
45 |
+
eg. Play a url:
|
46 |
+
<code>[mp3j track="www.site.com/tune.mp3"]</code>
|
47 |
+
|
48 |
+
<br />
|
49 |
+
eg. Play a library or default folder mp3:
|
50 |
+
<code>[mp3j track="myfile.mp3"]</code>
|
51 |
+
|
52 |
+
<br />
|
53 |
+
eg. Play track 30 from custom-fields playlist/folder:
|
54 |
+
<code>[mp3j track="30"]</code>
|
55 |
+
|
56 |
+
<br />
|
57 |
+
eg Play incrementally from custom-fields playlist/folder:
|
58 |
+
<code>[mp3j]</code>
|
59 |
+
|
60 |
+
<br /><br />
|
61 |
+
|
62 |
+
[mp3-jplayer] adds playlist players
|
63 |
+
|
64 |
+
eg. Play files, url's, folders:
|
65 |
+
<code>[mp3-jplayer tracks="file.mp3, url, FEED:/myfolder"]</code>
|
66 |
+
|
67 |
+
<br />
|
68 |
+
eg. Play custom fields and shuffle them:
|
69 |
+
<code>[mp3-jplayer shuffle="y"]</code>
|
70 |
+
|
71 |
+
<br />
|
72 |
+
eg. Play 7 random library mp3's:
|
73 |
+
<code>[mp3-jplayer pick="7" tracks="FEED:LIB"]</code>
|
74 |
+
<br />
|
75 |
+
|
76 |
+
Other examples:
|
77 |
+
|
78 |
+
<code>[mp3t vol="70" loop="y" track="myfile.mp3"]</code>
|
79 |
+
|
80 |
+
<code>[mp3-jplayer width="30%" height="80px" autoplay="y" tracks="FEED:DF"]</code>
|
81 |
+
|
82 |
+
<code>[mp3j flip="y"]</code>
|
83 |
+
|
84 |
+
<br />
|
85 |
+
Please see the help on the plugin's settings page for more info and a full list of parameters.
|
86 |
+
|
87 |
+
|
88 |
+
== Installation ==
|
89 |
+
|
90 |
+
Install using WordPress:
|
91 |
+
|
92 |
+
1. Log in and go to 'plugins' -> 'Add New'.
|
93 |
+
3. Search for 'mp3-jplayer' and hit the 'Install now' link in the results, Wordpress will install it.
|
94 |
+
4. Activate the plugin.
|
95 |
+
|
96 |
+
Install manually:
|
97 |
+
|
98 |
+
1. Download the zip file and unzip it.
|
99 |
+
2. Open the unzipped folder and upload the entire contents (1 folder and it's files and subfolders) to your `/wp-content/plugins` directory on the server.
|
100 |
+
3. Activate the plugin through the WordPress 'Plugins' menu.
|
101 |
+
|
102 |
+
|
103 |
+
== Frequently Asked Questions ==
|
104 |
+
|
105 |
+
= Supported file formats? =
|
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.
|
113 |
+
|
114 |
+
= Player says connecting but never plays? =
|
115 |
+
Check the filename spelling and the path/uri are correct. Remove any accented letters from mp3 filenames (and re-upload if they're from the library). Check the mp3 encoding (see above).
|
116 |
+
|
117 |
+
= Player just doesn't show up? =
|
118 |
+
This will happen if the playlist you've asked for doesn't result in anything to play, for example if you're using 'FEED' and the folder path is remote, or if you're playing remote files and the option 'allow mp3s from other domains' is unticked.
|
119 |
+
|
120 |
+
= Header and footer players? =
|
121 |
+
Use widget areas (if available), or use the mp3j_addscripts() and mp3j_put() functions in template files. See help in the plugin for an example.
|
122 |
+
|
123 |
+
= Player appears but something is broken? =
|
124 |
+
Probably a javascript conflict, often a hard-coded script in a theme. check your page source from the browser (CTRL+U) for repeated inclusions of both jQuery and jQuery-UI.
|
125 |
+
|
126 |
+
= Report bugs/issues? =
|
127 |
+
Either on the forum at Wordpress, or [here](http://sjward.org/contact).
|
128 |
+
|
129 |
+
|
130 |
+
== Screenshots ==
|
131 |
+
|
132 |
+
1. Playlist player examples
|
133 |
+
2. A popout player example
|
134 |
+
3. Single players and playlist player examples
|
135 |
+
4. The admin settings page
|
136 |
+
5. Colour picker opened on the settings page.
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
== Changelog ==
|
141 |
+
|
142 |
+
= 1.8.10 =
|
143 |
+
* Fix popout.
|
144 |
+
* Add support for players in hidden elements (it's now handled automatically).
|
145 |
+
* Start admin improvements (settings is now a top level menu).
|
146 |
+
|
147 |
+
= 1.8.9 =
|
148 |
+
* Fix for Android/Chrome. For info on the fix see Mark Panaghiston's posts at the bottom of [this jPlayer thread](https://groups.google.com/forum/#!msg/jplayer/BoVUNok0yl4/LU8q2wggQaYJ).
|
149 |
+
|
150 |
+
= 1.8.8 =
|
151 |
+
* Updated jQuery.jPlayer to 2.6.0.
|
152 |
+
* Improved admin-side security.
|
153 |
+
* Fixed compatibility with 'Scripts to Footer' plugin.
|
154 |
+
* Fixed a routine that could throw a php warning.
|
155 |
+
|
156 |
+
= 1.8.7 =
|
157 |
+
* Fixed autoplay in the popout when using the popout shortcode [mp3-popout].
|
158 |
+
* Improved widget detection for scripts to allow for core's wp_convert_widget_settings.
|
159 |
+
* Sorted the overlapping field on widget interface.
|
160 |
+
|
161 |
+
= 1.8.6 =
|
162 |
+
* Correct popout script references (apologies, missed in the last update meaning the popout didn't function).
|
163 |
+
|
164 |
+
= 1.8.5 =
|
165 |
+
* Updated jQuery.jPlayer to 2.5.0.
|
166 |
+
* Security updates.
|
167 |
+
|
168 |
+
= 1.8.4 =
|
169 |
+
* Updated jQuery.jPlayer to 2.3.0 (security fixes).
|
170 |
+
|
171 |
+
= 1.8.3 =
|
172 |
+
* Moved to jQuery.jPlayer 2.2.0 (fixes plugin problems with recent flash release (v11.6) in browsers like IE and Firefox (time was displaying as 'NaN', tracks not advancing/autoplaying)).
|
173 |
+
* Fixed the auto number option for arbitrary single players (they were all numbered 1!).
|
174 |
+
* Fixed quotes in captions (they were unescaped still and would break players), thanks to Chris for reporting.
|
175 |
+
* Fixed a couple of routines that could throw php warnings, thanks to Rami for reporting.
|
176 |
+
* Added the much requested option to try force browsers into saving mp3 downloads (instead of playing them in some kinda built-in player). Maintains right click save-ability. No mobile support just yet. Switched on for local files by default. Can also be set up for remote files (see the help). Option is under 'Playlist player options' on the settings page. Please feedback any issues.
|
177 |
+
* Added option to turn any mp3 links in a page into players, which means you can now add players using the 'Add media' button on the page/post edit screens. It has as an editable shortcode on the player settings page (under template options). Option is on by default. Switch it off near top of settings page.
|
178 |
+
* Added the 'style' parameter onto the MP3j-ui widget.
|
179 |
+
|
180 |
+
= 1.8.1 =
|
181 |
+
* Some css corrections - missing image for the buttons on the 'custom' style, and the smaller font sizes when using the 'mods' option.
|
182 |
+
|
183 |
+
= 1.8 =
|
184 |
+
* Fixed bug in javascript that caused problems in WordPress 3.5 (players broke after a couple of clicks).
|
185 |
+
* Fixed bug when single quotes ended up in a popout title (it broke players).
|
186 |
+
* Fixed bug in widget when it was set with a non-existent page id (it broke players).
|
187 |
+
* Fixed bug with mp3j_put function (it could pick up the adjacent post's tracks in some scenarios).
|
188 |
+
* Fixed bug with https urls.
|
189 |
+
* Fixed bug in pick parameter.
|
190 |
+
* Fixed bug with 'Allow mp3s from other domains' option (it affected single players when it was unticked).
|
191 |
+
* Fixed display of hours on long mp3s (player will display the hours only when needed).
|
192 |
+
* Fixed css that was hiding playlists in Opera browser.
|
193 |
+
* Fixed titles running into captions.
|
194 |
+
* Fixed titles obscuring slider motion (not IE proof).
|
195 |
+
* Added 'images' parameter on [mp3-jplayer], they can be set per track and are carried to the popout.
|
196 |
+
* Added easier styling option via a 'style' parameter that can be used in shortcodes (takes class names separated by spaces). Some classes are included as follows: bigger1 bigger2 bigger3 bigger4 bigger5 smaller outline dark text bars100 bars150 bars200 bars250 nolistbutton nopopoutbutton nostop nopn wtransbars btransbars. See examples on the demo page.
|
197 |
+
* Added new download option 'loggedin' which shows alternative text/link if visitor is not logged in.
|
198 |
+
* Added shortcode [mp3-popout] which creates a link to a popout player.
|
199 |
+
* Added volume slider option and shortcode parameter for [mp3t] and [mp3j] players.
|
200 |
+
* Added order control of library mp3s (when using 'FEED:LIB'), options are (asc/desc) by upload date, title, filename, or caption/filename, this is a global setting (not per player).
|
201 |
+
* Added new shortcode parameter (fsort="desc") for reversing folder playlist order.
|
202 |
+
* Added option to run player shortcodes in manually written excerpts.
|
203 |
+
* Added template tag - mp3j_div() for use in theme files when using players in hidden/collapsable tabs, lightboxes etc (allows players to function ok in hidden elements if flash gets used).
|
204 |
+
* Added option to bypass jQuery / jQueryUI script requests.
|
205 |
+
* Added choice of separators to use when writing playlists in shortcodes/widgets.
|
206 |
+
* Added touchpunch.js for useable sliders on touch screen devices.
|
207 |
+
* Many more improvements and minor fixes.
|
208 |
+
|
209 |
+
= 1.7.3 =
|
210 |
+
* Stopped files of audio/mpeg MIME type other than mp3 from showing on the player's library file list on the settings page. They won't appear in playlists when using 'FEED:LIB' now.
|
211 |
+
* Corrected graphics error introduced last update on the popout button, thanks to Peter for reporting.
|
212 |
+
|
213 |
+
= 1.7.2 =
|
214 |
+
* Fixed bug in the case where sidebars_widgets array was not defined (was throwing a php warning), thanks to Craig for reporting.
|
215 |
+
* Fixed bug on search pages where full post content was being used (players in posts were breaking unless a player widget was present), thanks to Marco for reporting.
|
216 |
+
* Fixed loop parameter in single players (wasn't responding to 'n' or '0'). Thanks to George for reporting.
|
217 |
+
* Corrected the template tag handling so that it can auto pick-up mp3's from post fields on index/archive/search pages.
|
218 |
+
* Fixed the 'text' player's colour pickup for the popout, and refined it's layout a little.
|
219 |
+
* Changed from using depreciated wp user-levels to capabilities for options page setup (was throwing a wp_debug warning).
|
220 |
+
* Corrected typos in the plugin help (invasion of capitalised L's).
|
221 |
+
|
222 |
+
= 1.7.1 =
|
223 |
+
* Fixed widgets on search pages, and added 'search' as an include/exclude value for the page filter. Thanks to Flavio for reporting.
|
224 |
+
* Fixed pick-up of default colours when using template tags, and the indicator on single players.
|
225 |
+
|
226 |
+
= 1.7 =
|
227 |
+
* Added multiple players ability, backwards compatible (see notes below).
|
228 |
+
* Added single-file players.
|
229 |
+
* Added pop-out.
|
230 |
+
* Added colour picker to settings.
|
231 |
+
* Added player width and height settings, captions (or titles) will word-wrap.
|
232 |
+
* Added shortcodes widget.
|
233 |
+
* Updated jQuery UI and fixed script enqueuing.
|
234 |
+
* Fixed page filter for widget, added index and archive options.
|
235 |
+
* Changed ul transport to div (for better stability across themes).
|
236 |
+
* General improvements and bug fixes.
|
237 |
+
* NOTE 1: File extensions must be used (previously it was optional).
|
238 |
+
* NOTE 2: Shortcodes are needed to add players within the content (previously it was optional).
|
239 |
+
* NOTE 3: CSS has changed (id's changed to classes, most renamed), old sheets won't work without modification.
|
240 |
+
|
241 |
+
= 1.4.3 =
|
242 |
+
* Fixed player buttons for Modularity Lite and Portfolio Press themes (they were disappearing / misaligned when player was in sidebar), thanks to Nate, Jeppe, and Nicklas for the reports.
|
243 |
+
* Fixed the bug in stylesheet loading when using the mp3j_addscripts() template tag (style was not being loaded in some cases), thanks to biggordonlips for reporting.
|
244 |
+
|
245 |
+
= 1.4.2 =
|
246 |
+
* Fixed error in the scripts handling for the widget, thanks to Kathy for reporting.
|
247 |
+
* Fixed the non-showing library captions when using widget modes 2/3 to play library files.
|
248 |
+
* Fixed (hopefully) the mis-aligned buttons that were still happening in some themes.
|
249 |
+
|
250 |
+
= 1.4.1 =
|
251 |
+
* Added a repeat play option on settings page.
|
252 |
+
* Fixed text-player buttons css in Opera.
|
253 |
+
* Fixed initial-volume setting error where only the slider was being set and not the volume. Thanks to Darkwave for reporting.
|
254 |
+
|
255 |
+
= 1.4.0 =
|
256 |
+
* Added a widget.
|
257 |
+
* Improvements to admin including library and default folder mp3 lists, custom stylesheet setting, and some new options.
|
258 |
+
* Added new shortcode attributes shuffle, slice, id. New values for list
|
259 |
+
* Added a way to play whole folders, the entire library, to grab the tracks from another page.
|
260 |
+
* Added a simpler text-only player style that adopts theme link colours.
|
261 |
+
* Improved admin help.
|
262 |
+
* Some minor bug fixes.
|
263 |
+
* Some minor css improvements and fixes.
|
264 |
+
|
265 |
+
= 1.3.4 =
|
266 |
+
* Added template tags.
|
267 |
+
* Added new shortcode attributes play and list, and added more values for pos.
|
268 |
+
* Added new default position options on settings page
|
269 |
+
* Added a smaller player option
|
270 |
+
|
271 |
+
= 1.3.3 =
|
272 |
+
* Fixed the CSS that caused player to display poorly in some themes.
|
273 |
+
|
274 |
+
= 1.3.2 =
|
275 |
+
* Added the shortcode [mp3-jplayer] and attributes: pos (left, right, none), dload (true, false) which over-ride the admin-panel position and download settings on that post/page. Eg. [mp3-jplayer pos="right" dload="true"]
|
276 |
+
* Tweaked transport button graphic a wee bit.
|
277 |
+
|
278 |
+
= 1.3.1 =
|
279 |
+
* Fixed image rollover on buttons when wordpress not installed in root of site.
|
280 |
+
|
281 |
+
= 1.3.0 =
|
282 |
+
* First release on Wordpress.org
|
283 |
+
* Updated jquery.jplayer.min.js to version 1.2.0 (including the new .swf file). The plugin should now work on the iPad.
|
284 |
+
* Fixed admin side broken display of the uploads folder path that occured when a path had been specified but didn't yet exist.
|
285 |
+
* Fixed the broken link to the (new) media settings page when running in Wordpress 3.
|
286 |
+
* Changed the 'Use my media library titles...' option logic to allow any titles or captions to independently over-ride the library by default. The option is now 'Always use my media library titles...' which when ticked will give preference to library titles/captions over those in the custom fields.
|
287 |
+
* Modified the css for compatibility with Internet Explorer 6. The player should now display almost the same in IE6 as in other browsers.
|
288 |
+
|
289 |
+
= 1.2.12 =
|
290 |
+
* Added play order setting, a 'download mp3' link option, show/hide playlist and option, a connecting state, a new style.
|
291 |
+
* The 'Default folder' option can now be a remote uri to a folder, if it is then it doesn't get filtered from the playists when 'allow remote' is unticked.
|
292 |
+
|
293 |
+
= 1.2.0 =
|
294 |
+
* Added playing of media library mp3's in the same way as from the default folder (ie. by entering just a filename). User does not have to specify where the tracks reside (recognises library file, default folder file, and local or remote uri's).
|
295 |
+
* Added filter option to remove off-site mp3's from the playlists.
|
296 |
+
* The plugin now clears out it's settings from the database by default upon deactivation. This can be changed from the settings page.
|
297 |
+
* It's no longer necessary to include the file extension when writing filenames.
|
298 |
+
|
299 |
+
= 1.1.0 =
|
300 |
+
* Added captions, player status info, a-z sort option, basic player positioning, detecting of urls/default folder
|
301 |
+
* Fixed bug where using unescaped double quotes in a title broke the playlist, quotes are now escaped automatically and can be used.
|
302 |
+
|
303 |
+
= 1.0 =
|
304 |
+
* First release
|