Hi Andrew,
Your site load the content via AJAX; the player initializer is called onDocumentReady and transform each mp3 url into a player. In your case, when the function is called, none of the links to an mp3 file is on the DOM of the page. When the content is loaded into the page it’s too late.
You should call the mb.miniAudioPlayer initialize function each time you load a new content via AJAX on the ajaxSuccess callback.
Try replacing the miniAudioPlayer_player_head() function (from line 109 to line 146) of the miniAudioPlayer.php file with:
function miniAudioPlayer_player_head() {
global $miniAudioPlayer_getMetadata, $miniAudioPlayer_width,$miniAudioPlayer_skin, $miniAudioPlayer_animate,$miniAudioPlayer_volume,$miniAudioPlayer_autoplay,$miniAudioPlayer_showVolumeLevel,$miniAudioPlayer_showTime,$miniAudioPlayer_showRew;
echo '
<!-- start miniAudioPlayer initializer -->
<script type="text/javascript">
if(!map) var map={};
map.downloadUrl = "'.plugins_url( 'map_download.php', __FILE__ ).'";
map.userCanDownload = '.(current_user_can('read') == 1 ? "true" : "false").';
function initializeMiniAudioPlayer(){
jQuery("a[href*=\'.mp3\'] ,a[href*=\'.m4a\']")'.getExcluded().'mb_miniPlayer({
inLine:true,
width:"'.$miniAudioPlayer_width.'",
skin:"'.$miniAudioPlayer_skin.'",
animate:'.$miniAudioPlayer_animate.',
volume:'.$miniAudioPlayer_volume.',
autoplay:'.$miniAudioPlayer_autoplay.',
showVolumeLevel:'.$miniAudioPlayer_showVolumeLevel.',
showTime:'.$miniAudioPlayer_showTime.',
id3:'.$miniAudioPlayer_getMetadata.',
showRew:'.$miniAudioPlayer_showRew.',
downloadable:'.canDownload().',
swfPath:"'.plugins_url( '/js/', __FILE__ ).'"
});
}
jQuery(function(){
initializeMiniAudioPlayer();
jQuery(document).ajaxSuccess(function(event, xhr, settings) {
initializeMiniAudioPlayer();
});
});
</script>
<!-- end miniAudioPlayer initializer -->
';
};
If it works I’ll include this fix on the next release.
Bye,
Matteo