MP3-jPlayer - Version 1.7.3

Version Description

  • 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.
  • Corrected graphics error introduced last update on the popout button, thanks to Peter for reporting.
Download this release

Release Info

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

Code changes from version 1.7.2 to 1.7.3

css/images/Thumbs.db CHANGED
Binary file
css/images/buttons-popout.png CHANGED
Binary file
css/player-darkgrey.css CHANGED
@@ -116,8 +116,8 @@
116
  div.dloadmp3-MI.whilelinks a:hover { color: #fff; }
117
 
118
  /* POPOUT BUTTON */
119
- div.mp3j-popout-MI { position:absolute; font:normal normal 500 10px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif; bottom:17px; left:1px; height:16px; color:#595959; padding:3px 8px 0px 27px; line-height:11px; border:0px solid #686868; background:#555 url('images/buttons-popout.png') no-repeat -5px -5px; -moz-border-radius:2px; -webkit-border-radius:2px; cursor:default; }
120
- div.mp3j-popout-MI:hover { color:#666; background:#606060 url('images/buttons-popout.png') no-repeat -45px -5px; }
121
 
122
  /* BARS */
123
  .ui-state-disabled { cursor:default !important; }
116
  div.dloadmp3-MI.whilelinks a:hover { color: #fff; }
117
 
118
  /* POPOUT BUTTON */
119
+ div.mp3j-popout-MI { position:absolute; font:normal normal 500 10px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif; bottom:17px; left:1px; height:16px; color:#a2a2a2; padding:3px 6px 0px 29px; line-height:11px; border:0px solid #686868; background:#555 url('images/buttons-popout.png') no-repeat -5px -5px; -moz-border-radius:2px; -webkit-border-radius:2px; cursor:default; }
120
+ div.mp3j-popout-MI:hover { color:#aaa; background:#606060 url('images/buttons-popout.png') no-repeat -5px -35px; }
121
 
122
  /* BARS */
123
  .ui-state-disabled { cursor:default !important; }
css/player-silver.css CHANGED
@@ -116,8 +116,8 @@
116
  div.dloadmp3-MI.whilelinks a:hover { color: #fff; }
117
 
118
  /* POPOUT BUTTON */
119
- div.mp3j-popout-MI { position:absolute; font:normal normal 500 9px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif; bottom:18px; left:1px; height:16px; color:#595959; padding:3px 5px 0px 28px; min-width:2px; line-height:11px; border:1px solid #acacac; background:#bfbfbf url('images/buttons-popout.png') no-repeat -5px -35px; -moz-border-radius:2px; -webkit-border-radius:2px; cursor:default; }
120
- div.mp3j-popout-MI:hover { color:#606060; background:#c6c6c6 url('images/buttons-popout.png') no-repeat -45px -35px; }
121
 
122
  /* BARS */
123
  .ui-state-disabled { cursor:default !important; }
116
  div.dloadmp3-MI.whilelinks a:hover { color: #fff; }
117
 
118
  /* POPOUT BUTTON */
119
+ div.mp3j-popout-MI { position:absolute; font:normal normal 500 9px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif; bottom:18px; left:1px; height:16px; color:#595959; padding:3px 5px 0px 28px; min-width:2px; line-height:11px; border:1px solid #acacac; background:#bfbfbf url('images/buttons-popout.png') no-repeat -5px -65px; -moz-border-radius:2px; -webkit-border-radius:2px; cursor:default; }
120
+ div.mp3j-popout-MI:hover { color:#606060; background:#c6c6c6 url('images/buttons-popout.png') no-repeat -5px -95px; }
121
 
122
  /* BARS */
123
  .ui-state-disabled { cursor:default !important; }
css/player-silverALT.css CHANGED
@@ -151,7 +151,7 @@
151
 
152
  /* POPOUT BUTTON */
153
  div.mp3j-popout-MI { position:absolute; font:normal normal 500 9px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif; bottom:18px; left:0px; height:16px; color:#595959; padding:3px 5px 0px 28px; min-width:2px; line-height:11px; border:1px solid #acacac; background:#bfbfbf url('images/buttons-popout.png') no-repeat -5px -5px; -moz-border-radius:2px; -webkit-border-radius:2px; cursor:default; z-index:30; }
154
- div.mp3j-popout-MI:hover { color:#606060; background:#c6c6c6 url('images/buttons-popout.png') no-repeat -45px -5px; }
155
 
156
 
157
  /* sliders/bars */
151
 
152
  /* POPOUT BUTTON */
153
  div.mp3j-popout-MI { position:absolute; font:normal normal 500 9px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif; bottom:18px; left:0px; height:16px; color:#595959; padding:3px 5px 0px 28px; min-width:2px; line-height:11px; border:1px solid #acacac; background:#bfbfbf url('images/buttons-popout.png') no-repeat -5px -5px; -moz-border-radius:2px; -webkit-border-radius:2px; cursor:default; z-index:30; }
154
+ div.mp3j-popout-MI:hover { color:#606060; background:#c6c6c6 url('images/buttons-popout.png') no-repeat -5px -35px; }
155
 
156
 
157
  /* sliders/bars */
js/mp3-jplayer.js CHANGED
@@ -1,211 +1,211 @@
1
- /* MP3-jPlayer
2
- 1.7 */
3
-
4
- var $tid = "";
5
- var $state = "";
6
- var global_lp = 0;
7
- var pp_playerID;
8
- var pp_startplaying;
9
- var player_height = 100;
10
- var popout_height;
11
- var $link_playID = "";
12
-
13
- jQuery(document).ready(function(){
14
- if ( typeof mp3j_info === "undefined" ) { return; }
15
- mp3j_setup();
16
- jQuery("#jquery_jplayer").jPlayer({
17
- ready: function() {
18
- mp3j_init();
19
- },
20
- oggSupport: false,
21
- volume: 100,
22
- swfPath: foxpathtoswf
23
- })
24
- .jPlayer("onProgressChange", function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
25
- run_progress_update( $tid, loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime );
26
- })
27
- .jPlayer("onSoundComplete", function() {
28
- run_sound_complete();
29
- });
30
- if (typeof window.mp3j_footerjs === "function") { mp3j_footerjs(); }
31
- });
32
-
33
- // Prep arrays, click functions & initial text
34
- function mp3j_setup() {
35
- I_images();
36
- I_unwrap();
37
- if ( typeof mp3j_info !== "undefined" ) { I_setup_players(); }
38
- return;
39
- }
40
-
41
- function mp3j_init() {
42
- var j;
43
- for ( j=0; j < mp3j_info.length; j++ ) {
44
- if ( mp3j_info[j].autoplay ) {
45
- mp3j_info[j].autoplay = false;
46
- E_playpause_click( j );
47
- return;
48
- }
49
- }
50
- }
51
-
52
- function make_slider( id ) {
53
- if ( mp3j_info[id].status === "basic" ) { jQuery('#posbar_mp3j_'+id).css( "visibility", "hidden" ); }
54
- jQuery('#posbar_mp3j_'+id).slider({
55
- max: 1000,
56
- range: 'min',
57
- animate: FoxAnimSlider,
58
- slide: function(event, ui) {
59
- if ( $state === "paused" ) { pause_button( id, mp3j_info[id].play_txt, mp3j_info[id].pause_txt ); }
60
- jQuery("#jquery_jplayer").jPlayer("playHead", ui.value*(10.0/global_lp) );
61
- $state = "playing";
62
- }
63
- });
64
- }
65
-
66
- function change_list_classes( id, track ) {
67
- jQuery("#mp3j_A_"+id+"_"+mp3j_info[id].tr).removeClass("mp3j_A_current").parent().removeClass("mp3j_A_current");
68
- jQuery("#mp3j_A_"+id+"_"+track).addClass("mp3j_A_current").parent().addClass("mp3j_A_current");
69
- }
70
-
71
- function run_progress_update( id, loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime ) {
72
- if ( id === "" ) { return; }
73
- //var ppaInt = parseInt(playedPercentAbsolute, 10);
74
- //var lpInt = parseInt(loadPercent, 10);
75
- global_lp = loadPercent;
76
- jQuery("#load_mp3j_"+id).css( "width", loadPercent+"%" );
77
- jQuery('#posbar_mp3j_'+id).slider('option', 'value', playedPercentAbsolute*10);
78
- var dl = mp3j_info[id].download;
79
-
80
- // BASIC Status update
81
- if ( mp3j_info[id].status === "basic" ) {
82
- jQuery("#indi_mp3j_"+id).empty();
83
- if (jQuery("#jquery_jplayer").jPlayer("getData", "diag.isPlaying")){ // "PLAYING"
84
- if (playedTime===0 && loadPercent===0){ // connecting
85
- jQuery("#indi_mp3j_"+id).append('<span style="margin-left:6px;"><span class="mp3-finding"></span><span class="mp3-tint" style="background:#999;"></span></span>');
86
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("whilelinks"); jQuery("#download_mp3j_"+id).addClass("betweenlinks"); }
87
- }
88
- if (playedTime===0 && loadPercent>0){// buffering
89
- jQuery("#indi_mp3j_"+id).append('<span style="margin-left:6px;"><span class="mp3-finding"></span><span class="mp3-tint" style="background:#999;"></span></span>');
90
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
91
- }
92
- if (playedTime>0){ // playing
93
- jQuery('#posbar_mp3j_'+id).css( "visibility", "visible" );
94
- jQuery("#indi_mp3j_"+id).append('<span style="margin-left:6px;"><span class="mp3-tint" style="opacity:.8; filter:alpha(opacity=80);"></span></span>');
95
- jQuery("#indi_mp3j_"+id).append('<span> '+jQuery.jPlayer.convertTime(playedTime)+'</span>');
96
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
97
- }
98
- } else { // "STOPPED"
99
- jQuery("#indi_mp3j_"+id).empty();
100
- if (playedTime>0){ // paused
101
- jQuery("#indi_mp3j_"+id).append('<span style="margin-left:6px;"><span class="mp3-tint" style="opacity:.8; filter:alpha(opacity=80);"></span></span>');
102
- jQuery("#indi_mp3j_"+id).append('<span> '+jQuery.jPlayer.convertTime(playedTime)+'</span>');
103
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
104
- }
105
- if (playedTime===0){
106
- if(loadPercent>0){ // stopped
107
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
108
- }
109
- }
110
- }
111
- }
112
- //FULL Status update
113
- if ( mp3j_info[id].status === "full" ) {
114
- jQuery("#T-Time-MI_"+id).hide();
115
- jQuery("#T-Time-MI_"+id).text(jQuery.jPlayer.convertTime(totalTime));
116
- jQuery("#P-Time-MI_"+id).text(jQuery.jPlayer.convertTime(playedTime));
117
- jQuery("#statusMI_"+id).empty();
118
- if (jQuery("#jquery_jplayer").jPlayer("getData", "diag.isPlaying")){ // "PLAYING"
119
- if (playedTime===0 && loadPercent===0){ // connecting
120
- jQuery("#statusMI_"+id).append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Connecting');
121
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("whilelinks"); jQuery("#download_mp3j_"+id).addClass("betweenlinks"); }
122
- }
123
- if (playedTime===0 && loadPercent>0){// buffering
124
- jQuery("#statusMI_"+id).append('<span class="mp3-loading"></span><span class="mp3-tint"></span>Buffering');
125
- jQuery("#T-Time-MI_"+id).show();
126
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
127
- }
128
- if (playedTime>0){ // playing
129
- jQuery("#statusMI_"+id).append('Playing');
130
- jQuery("#T-Time-MI_"+id).show();
131
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
132
- }
133
- } else { // "STOPPED"
134
- if (playedTime>0){ // paused
135
- jQuery("#statusMI_"+id).append('Paused');
136
- jQuery("#T-Time-MI_"+id).show();
137
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
138
- }
139
- if (playedTime===0){
140
- if(loadPercent>0){ // stopped
141
- jQuery("#statusMI_"+id).append('Stopped');
142
- jQuery("#T-Time-MI_"+id).show();
143
- if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
144
- } else { // ready
145
- jQuery("#statusMI_"+id).append('Ready');
146
- }
147
- }
148
- }
149
- }
150
- }
151
-
152
- function launch_mp3j_popout( url, id ) {
153
- var li_height = 28;
154
- player_height = 100 + mp3j_info[id].height;
155
- popout_height = ( mp3j_info[id].list.length > 1 ) ? player_height + ( mp3j_info[id].list.length * li_height) : player_height;
156
- if ( popout_height > popup_maxheight ) { popout_height = popup_maxheight; }
157
- var open_at_height = ( mp3j_info[id].lstate ) ? popout_height : player_height;
158
-
159
- pp_startplaying = ( jQuery("#jquery_jplayer").jPlayer("getData", "diag.isPlaying") ) ? true : false;
160
- pp_playerID = id;
161
- play_button( $tid );
162
- clear_bars( $tid );
163
- clear_status( $tid );
164
- $tid = "";
165
- $state = "";
166
- $link_playID = "";
167
- // g chrome workaround, stops the hang
168
- jQuery("#jquery_jplayer").jPlayer("setFile", silence_mp3 );
169
- jQuery("#jquery_jplayer").jPlayer("play");
170
-
171
- jQuery("#jquery_jplayer").jPlayer("clearFile");
172
- // open popup window
173
- newwindow = window.open(url,'mp3jpopout','height=100,width=100,location=1,status=1,scrollbars=1,resizable=1,left=25,top=25');
174
- newwindow.resizeTo( popup_width, open_at_height );
175
- if (window.focus) { newwindow.focus(); }
176
- return false;
177
- }
178
-
179
- function MI_toggleplaylist(text, id){
180
- if ( mp3j_info[id].lstate ) {
181
- if ( text==="" ) { text="SHOW"; }
182
- jQuery("#L_mp3j_"+id).fadeOut(300);
183
- jQuery("#playlist-toggle_"+id).empty();
184
- jQuery("#playlist-toggle_"+id).append(text);
185
- mp3j_info[id].lstate = false;
186
- return;
187
- }
188
- if ( !mp3j_info[id].lstate ) {
189
- if ( text==="" ) { text="HIDE"; }
190
- jQuery("#L_mp3j_"+id).fadeIn("slow");
191
- jQuery("#playlist-toggle_"+id).empty();
192
- jQuery("#playlist-toggle_"+id).append(text);
193
- mp3j_info[id].lstate = true;
194
- return;
195
- }
196
- }
197
-
198
- function link_plays_track( player, track ) {
199
- if ( typeof mp3j_info === "undefined" ) { return; }
200
- player--;
201
- track--;
202
- if ( player === $link_playID && track === mp3j_info[player].tr && $state !== "" ) {
203
- return;
204
- }
205
- if ( typeof mp3j_info[player].has_ul !== "undefined" && mp3j_info[player].has_ul === 1 ) {
206
- if ( track >= 0 && track < mp3j_info[player].list.length ) {
207
- E_change_track( player, track );
208
- $link_playID = player;
209
- }
210
- }
211
  }
1
+ /* MP3-jPlayer
2
+ 1.7.3 */
3
+
4
+ var $tid = "";
5
+ var $state = "";
6
+ var global_lp = 0;
7
+ var pp_playerID;
8
+ var pp_startplaying;
9
+ var player_height = 100;
10
+ var popout_height;
11
+ var $link_playID = "";
12
+
13
+ jQuery(document).ready(function(){
14
+ if ( typeof mp3j_info === "undefined" ) { return; }
15
+ mp3j_setup();
16
+ jQuery("#jquery_jplayer").jPlayer({
17
+ ready: function() {
18
+ mp3j_init();
19
+ },
20
+ oggSupport: false,
21
+ volume: 100,
22
+ swfPath: foxpathtoswf
23
+ })
24
+ .jPlayer("onProgressChange", function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
25
+ run_progress_update( $tid, loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime );
26
+ })
27
+ .jPlayer("onSoundComplete", function() {
28
+ run_sound_complete();
29
+ });
30
+ if (typeof window.mp3j_footerjs === "function") { mp3j_footerjs(); }
31
+ });
32
+
33
+ // Prep arrays, click functions & initial text
34
+ function mp3j_setup() {
35
+ I_images();
36
+ I_unwrap();
37
+ if ( typeof mp3j_info !== "undefined" ) { I_setup_players(); }
38
+ return;
39
+ }
40
+
41
+ function mp3j_init() {
42
+ var j;
43
+ for ( j=0; j < mp3j_info.length; j++ ) {
44
+ if ( mp3j_info[j].autoplay ) {
45
+ mp3j_info[j].autoplay = false;
46
+ E_playpause_click( j );
47
+ return;
48
+ }
49
+ }
50
+ }
51
+
52
+ function make_slider( id ) {
53
+ if ( mp3j_info[id].status === "basic" ) { jQuery('#posbar_mp3j_'+id).css( "visibility", "hidden" ); }
54
+ jQuery('#posbar_mp3j_'+id).slider({
55
+ max: 1000,
56
+ range: 'min',
57
+ animate: FoxAnimSlider,
58
+ slide: function(event, ui) {
59
+ if ( $state === "paused" ) { pause_button( id, mp3j_info[id].play_txt, mp3j_info[id].pause_txt ); }
60
+ jQuery("#jquery_jplayer").jPlayer("playHead", ui.value*(10.0/global_lp) );
61
+ $state = "playing";
62
+ }
63
+ });
64
+ }
65
+
66
+ function change_list_classes( id, track ) {
67
+ jQuery("#mp3j_A_"+id+"_"+mp3j_info[id].tr).removeClass("mp3j_A_current").parent().removeClass("mp3j_A_current");
68
+ jQuery("#mp3j_A_"+id+"_"+track).addClass("mp3j_A_current").parent().addClass("mp3j_A_current");
69
+ }
70
+
71
+ function run_progress_update( id, loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime ) {
72
+ if ( id === "" ) { return; }
73
+ //var ppaInt = parseInt(playedPercentAbsolute, 10);
74
+ //var lpInt = parseInt(loadPercent, 10);
75
+ global_lp = loadPercent;
76
+ jQuery("#load_mp3j_"+id).css( "width", loadPercent+"%" );
77
+ jQuery('#posbar_mp3j_'+id).slider('option', 'value', playedPercentAbsolute*10);
78
+ var dl = mp3j_info[id].download;
79
+
80
+ // BASIC Status update
81
+ if ( mp3j_info[id].status === "basic" ) {
82
+ jQuery("#indi_mp3j_"+id).empty();
83
+ if (jQuery("#jquery_jplayer").jPlayer("getData", "diag.isPlaying")){ // "PLAYING"
84
+ if (playedTime===0 && loadPercent===0){ // connecting
85
+ jQuery("#indi_mp3j_"+id).append('<span style="margin-left:6px;"><span class="mp3-finding"></span><span class="mp3-tint" style="background:#999;"></span></span>');
86
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("whilelinks"); jQuery("#download_mp3j_"+id).addClass("betweenlinks"); }
87
+ }
88
+ if (playedTime===0 && loadPercent>0){// buffering
89
+ jQuery("#indi_mp3j_"+id).append('<span style="margin-left:6px;"><span class="mp3-finding"></span><span class="mp3-tint" style="background:#999;"></span></span>');
90
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
91
+ }
92
+ if (playedTime>0){ // playing
93
+ jQuery('#posbar_mp3j_'+id).css( "visibility", "visible" );
94
+ jQuery("#indi_mp3j_"+id).append('<span style="margin-left:6px;"><span class="mp3-tint" style="opacity:.8; filter:alpha(opacity=80);"></span></span>');
95
+ jQuery("#indi_mp3j_"+id).append('<span> '+jQuery.jPlayer.convertTime(playedTime)+'</span>');
96
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
97
+ }
98
+ } else { // "STOPPED"
99
+ jQuery("#indi_mp3j_"+id).empty();
100
+ if (playedTime>0){ // paused
101
+ jQuery("#indi_mp3j_"+id).append('<span style="margin-left:6px;"><span class="mp3-tint" style="opacity:.8; filter:alpha(opacity=80);"></span></span>');
102
+ jQuery("#indi_mp3j_"+id).append('<span> '+jQuery.jPlayer.convertTime(playedTime)+'</span>');
103
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
104
+ }
105
+ if (playedTime===0){
106
+ if(loadPercent>0){ // stopped
107
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ //FULL Status update
113
+ if ( mp3j_info[id].status === "full" ) {
114
+ jQuery("#T-Time-MI_"+id).hide();
115
+ jQuery("#T-Time-MI_"+id).text(jQuery.jPlayer.convertTime(totalTime));
116
+ jQuery("#P-Time-MI_"+id).text(jQuery.jPlayer.convertTime(playedTime));
117
+ jQuery("#statusMI_"+id).empty();
118
+ if (jQuery("#jquery_jplayer").jPlayer("getData", "diag.isPlaying")){ // "PLAYING"
119
+ if (playedTime===0 && loadPercent===0){ // connecting
120
+ jQuery("#statusMI_"+id).append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Connecting');
121
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("whilelinks"); jQuery("#download_mp3j_"+id).addClass("betweenlinks"); }
122
+ }
123
+ if (playedTime===0 && loadPercent>0){// buffering
124
+ jQuery("#statusMI_"+id).append('<span class="mp3-loading"></span><span class="mp3-tint"></span>Buffering');
125
+ jQuery("#T-Time-MI_"+id).show();
126
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
127
+ }
128
+ if (playedTime>0){ // playing
129
+ jQuery("#statusMI_"+id).append('Playing');
130
+ jQuery("#T-Time-MI_"+id).show();
131
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
132
+ }
133
+ } else { // "STOPPED"
134
+ if (playedTime>0){ // paused
135
+ jQuery("#statusMI_"+id).append('Paused');
136
+ jQuery("#T-Time-MI_"+id).show();
137
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
138
+ }
139
+ if (playedTime===0){
140
+ if(loadPercent>0){ // stopped
141
+ jQuery("#statusMI_"+id).append('Stopped');
142
+ jQuery("#T-Time-MI_"+id).show();
143
+ if ( dl ) { jQuery("#download_mp3j_"+id).removeClass("betweenlinks"); jQuery("#download_mp3j_"+id).addClass("whilelinks"); }
144
+ } else { // ready
145
+ jQuery("#statusMI_"+id).append('Ready');
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+
152
+ function launch_mp3j_popout( url, id ) {
153
+ var li_height = 28;
154
+ player_height = 100 + mp3j_info[id].height;
155
+ popout_height = ( mp3j_info[id].list.length > 1 ) ? player_height + ( mp3j_info[id].list.length * li_height) : player_height;
156
+ if ( popout_height > popup_maxheight ) { popout_height = popup_maxheight; }
157
+ var open_at_height = ( mp3j_info[id].lstate ) ? popout_height : player_height;
158
+
159
+ pp_startplaying = ( jQuery("#jquery_jplayer").jPlayer("getData", "diag.isPlaying") ) ? true : false;
160
+ pp_playerID = id;
161
+ play_button( $tid );
162
+ clear_bars( $tid );
163
+ clear_status( $tid );
164
+ $tid = "";
165
+ $state = "";
166
+ $link_playID = "";
167
+ // g chrome workaround, stops the hang
168
+ jQuery("#jquery_jplayer").jPlayer("setFile", silence_mp3 );
169
+ jQuery("#jquery_jplayer").jPlayer("play");
170
+
171
+ jQuery("#jquery_jplayer").jPlayer("clearFile");
172
+ // open popup window
173
+ newwindow = window.open(url,'mp3jpopout','height=100,width=100,location=1,status=1,scrollbars=1,resizable=1,left=25,top=25');
174
+ newwindow.resizeTo( popup_width, open_at_height );
175
+ if (window.focus) { newwindow.focus(); }
176
+ return false;
177
+ }
178
+
179
+ function MI_toggleplaylist(text, id){
180
+ if ( mp3j_info[id].lstate ) {
181
+ if ( text==="" ) { text="SHOW"; }
182
+ jQuery("#L_mp3j_"+id).fadeOut(300);
183
+ jQuery("#playlist-toggle_"+id).empty();
184
+ jQuery("#playlist-toggle_"+id).append(text);
185
+ mp3j_info[id].lstate = false;
186
+ return;
187
+ }
188
+ if ( !mp3j_info[id].lstate ) {
189
+ if ( text==="" ) { text="HIDE"; }
190
+ jQuery("#L_mp3j_"+id).fadeIn("slow");
191
+ jQuery("#playlist-toggle_"+id).empty();
192
+ jQuery("#playlist-toggle_"+id).append(text);
193
+ mp3j_info[id].lstate = true;
194
+ return;
195
+ }
196
+ }
197
+
198
+ function link_plays_track( player, track ) {
199
+ if ( typeof mp3j_info === "undefined" ) { return; }
200
+ player--;
201
+ track--;
202
+ if ( player === $link_playID && track === mp3j_info[player].tr && $state !== "" ) {
203
+ return;
204
+ }
205
+ if ( typeof mp3j_info[player].has_ul !== "undefined" && mp3j_info[player].has_ul === 1 ) {
206
+ if ( track >= 0 && track < mp3j_info[player].list.length ) {
207
+ E_change_track( player, track );
208
+ $link_playID = player;
209
+ }
210
+ }
211
  }
js/mp3j-admin.js CHANGED
@@ -1,5 +1,5 @@
1
  <!--
2
- /* MP3-jPlayer 1.7
3
  admin js */
4
 
5
  /* Form select event on player style dropdown */
1
  <!--
2
+ /* MP3-jPlayer 1.7.3
3
  admin js */
4
 
5
  /* Form select event on player style dropdown */
js/mp3j-functions.js CHANGED
@@ -1,5 +1,5 @@
1
  /* MP3-jPlayer common functions js
2
- 1.7.2 */
3
 
4
  /* Setup ======================= */
5
  function I_unwrap() {
1
  /* MP3-jPlayer common functions js
2
+ 1.7.3 */
3
 
4
  /* Setup ======================= */
5
  function I_unwrap() {
mp3j_main.php CHANGED
@@ -6,7 +6,7 @@ if ( !class_exists("MP3j_Main") )
6
  class MP3j_Main
7
  {
8
  // ------------------------- Update Me
9
- var $version_of_plugin = "1.7.2";
10
  // -----------------------------------
11
  var $WPinstallpath;
12
  var $Rooturl;
@@ -211,25 +211,29 @@ if ( !class_exists("MP3j_Main") )
211
  function grab_library_info() {
212
 
213
  global $wpdb;
214
- $audioInLibrary = $wpdb->get_results("SELECT DISTINCT guid, post_title, post_excerpt, post_content, ID FROM $wpdb->posts WHERE post_mime_type = 'audio/mpeg'");
215
- $Lcount = count($audioInLibrary);
216
  $this->mp3LibraryWP = $audioInLibrary;
217
 
218
  $j=0;
219
  foreach ( $audioInLibrary as $obj ) {
220
- $Titles[$j] = $obj->post_title;
221
- $Excerpts[$j] = $obj->post_excerpt;
222
- $Descriptions[$j] = $obj->post_content;
223
- $PostIDs[$j] = $obj->ID;
224
- $URLs[$j] = $obj->guid;
225
- $Filenames[$j] = strrchr( $URLs[$j], "/");
226
- $Filenames[$j] = str_replace( "/", "", $Filenames[$j]);
227
- $j++;
 
 
 
 
228
  }
229
  if ( $Filenames ) {
230
  natcasesort($Filenames);
231
  }
232
-
233
  $theLibrary = array( 'filenames' => $Filenames,
234
  'titles' => $Titles,
235
  'urls' => $URLs,
@@ -970,8 +974,8 @@ if ( !class_exists("MP3j_Main") )
970
 
971
  // jPlayer and Plugin js
972
  wp_enqueue_script( 'jquery.jplayer.min', '/wp-content/plugins/mp3-jplayer/js/jquery.jplayer.min.js', false, '1.2.0' );
973
- wp_enqueue_script( 'mp3j-functions', '/wp-content/plugins/mp3-jplayer/js/mp3j-functions.js', false, '1.7.2' );
974
- wp_enqueue_script( 'mp3-jplayer', '/wp-content/plugins/mp3-jplayer/js/mp3-jplayer.js', false, '1.7.2' );
975
 
976
  // css
977
  if ( $theme == "styleF" ) { $themepath = "/wp-content/plugins/mp3-jplayer/css/player-silver.css"; }
6
  class MP3j_Main
7
  {
8
  // ------------------------- Update Me
9
+ var $version_of_plugin = "1.7.3";
10
  // -----------------------------------
11
  var $WPinstallpath;
12
  var $Rooturl;
211
  function grab_library_info() {
212
 
213
  global $wpdb;
214
+ $audioInLibrary = $wpdb->get_results("SELECT DISTINCT guid, post_title, post_excerpt, post_content, ID FROM $wpdb->posts WHERE post_mime_type = 'audio/mpeg'");
215
+ //$Lcount = count($audioInLibrary);
216
  $this->mp3LibraryWP = $audioInLibrary;
217
 
218
  $j=0;
219
  foreach ( $audioInLibrary as $obj ) {
220
+
221
+ if ( preg_match("!\.mp3$!i", $obj->guid) ) { // audio/mpeg has multiple file associations so grab just mp3's
222
+ $Titles[$j] = $obj->post_title;
223
+ $Excerpts[$j] = $obj->post_excerpt;
224
+ $Descriptions[$j] = $obj->post_content;
225
+ $PostIDs[$j] = $obj->ID;
226
+ $URLs[$j] = $obj->guid;
227
+ $Filenames[$j] = strrchr( $URLs[$j], "/");
228
+ $Filenames[$j] = str_replace( "/", "", $Filenames[$j]);
229
+ $j++;
230
+ }
231
+
232
  }
233
  if ( $Filenames ) {
234
  natcasesort($Filenames);
235
  }
236
+ $Lcount = count($Filenames);
237
  $theLibrary = array( 'filenames' => $Filenames,
238
  'titles' => $Titles,
239
  'urls' => $URLs,
974
 
975
  // jPlayer and Plugin js
976
  wp_enqueue_script( 'jquery.jplayer.min', '/wp-content/plugins/mp3-jplayer/js/jquery.jplayer.min.js', false, '1.2.0' );
977
+ wp_enqueue_script( 'mp3j-functions', '/wp-content/plugins/mp3-jplayer/js/mp3j-functions.js', false, '1.7.3' );
978
+ wp_enqueue_script( 'mp3-jplayer', '/wp-content/plugins/mp3-jplayer/js/mp3-jplayer.js', false, '1.7.3' );
979
 
980
  // css
981
  if ( $theme == "styleF" ) { $themepath = "/wp-content/plugins/mp3-jplayer/css/player-silver.css"; }
mp3jplayer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://sjward.org/jplayer-for-wordpress
5
  Description: Add mp3 players to posts, pages, and sidebars. HTML5 / Flash. Shortcodes, widgets, and template tags. See the help on the settings page for a full list of options.
6
- Version: 1.7.2
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://sjward.org/jplayer-for-wordpress
5
  Description: Add mp3 players to posts, pages, and sidebars. HTML5 / Flash. Shortcodes, widgets, and template tags. See the help on the settings page for a full list of options.
6
+ Version: 1.7.3
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
readme.txt CHANGED
@@ -5,7 +5,7 @@ Contributors: simon.ward
5
  Tags: mp3, audio, mp3 player, music player, audio player, jplayer, playlist, jquery, shortcode, widget, css, posts, page, sidebar
6
  Requires at least: 2.8
7
  Tested up to: 3.2.1
8
- Stable tag: 1.7.2
9
 
10
  Add mp3 audio players to posts, pages, and sidebars. HTML5 / Flash. Uses jPlayer.
11
 
@@ -115,7 +115,7 @@ Check the filename spelling and the path/uri are correct. Remove any accented le
115
  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.
116
 
117
  = Player appears but something is broken? =
118
- Any number of reasons but the most commonly seen problem is poor use of a CDN or jQuery in theme files. Don't just shove your scripts in the header unless you like breaking stuff!
119
 
120
  = Report bugs/issues? =
121
  Either on the forum at Wordpress, or [here](http://sjward.org/contact).
@@ -123,18 +123,22 @@ Either on the forum at Wordpress, or [here](http://sjward.org/contact).
123
 
124
  == Screenshots ==
125
 
126
- 1. Players example 1.
127
- 2. Players example 2.
128
- 3. Popout player example.
129
- 4. Players example 3.
130
- 5. Players example 4.
131
- 6. Admin settings page.
132
- 7. Colour settings.
133
- 8. Other options.
134
 
135
 
136
  == Changelog ==
137
 
 
 
 
 
138
  = 1.7.2 =
139
  * Fixed bug in the case where sidebars_widgets array was not defined (was throwing a php warning), thanks to Craig for reporting.
140
  * 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.
5
  Tags: mp3, audio, mp3 player, music player, audio player, jplayer, playlist, jquery, shortcode, widget, css, posts, page, sidebar
6
  Requires at least: 2.8
7
  Tested up to: 3.2.1
8
+ Stable tag: 1.7.3
9
 
10
  Add mp3 audio players to posts, pages, and sidebars. HTML5 / Flash. Uses jPlayer.
11
 
115
  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.
116
 
117
  = Player appears but something is broken? =
118
+ Any number of reasons but the most commonly seen problem is poor use of a CDN or jQuery in theme files, check the page source for repeated scripts (including jquery-ui).
119
 
120
  = Report bugs/issues? =
121
  Either on the forum at Wordpress, or [here](http://sjward.org/contact).
123
 
124
  == Screenshots ==
125
 
126
+ 1. Players example 1
127
+ 2. Players example 2
128
+ 3. Popout player example
129
+ 4. Players example 3
130
+ 5. Players example 4
131
+ 6. Admin settings page
132
+ 7. Colour settings
133
+ 8. Other options
134
 
135
 
136
  == Changelog ==
137
 
138
+ = 1.7.3 =
139
+ * 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.
140
+ * Corrected graphics error introduced last update on the popout button, thanks to Peter for reporting.
141
+
142
  = 1.7.2 =
143
  * Fixed bug in the case where sidebars_widgets array was not defined (was throwing a php warning), thanks to Craig for reporting.
144
  * 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.