Closed chriseugenerodriguez closed 8 years ago
Should not have anything to do with php. jplayer is jquery client side! Is jquery loaded correctly? Any JS errors?
right okay than its something client side. Thats the error, yes jquery is loaded and all my scripts are running.
This is the error which is in title HTTP "Content-Type" of "text/html" is not supported. Load of media resource http://demo.premiumwd.com/adomo/wp-content/uploads/2014/12/Unbreakable-Elephante-Remix.mp3 failed. http://demo.premiumwd.com/themes/ellion/blog/
This is not an issue of jPlayer. You have many things messed up, e.g. 'You have included the Google Maps API multiple times on this page. This may cause unexpected errors.' Also there is a 500 internal error. So please clean up your code, and then try again...
As it looks, you are sending a GET request when pushing the play button on your player. And this request of course sends 'text/html' as content-type in the response header. It looks like that your button is not escaped properly for just jquery execution.
Did you even take a look at the code I wrote to execute the function? Google maps isnt even loading on page I gave you so it doesnt have anything to do with it.
jQuery(document).ready(function(){ if(jQuery().jPlayer) { jQuery("#jquery-jplayer-<?php the_ID(); ?>").jPlayer({ ready: function () { jQuery(this).jPlayer("setMedia", { <?php if(in_array('mp3',$formats)) { echo 'mp3: "'.$meta['_audio_mp3_url'][0].'",'."\n"; } ?> <?php if(in_array('m4a',$formats)) { echo 'm4a: "'.$meta['_audio_mp3_url'][0].'",'."\n"; } ?> <?php if(in_array('oga',$formats)) { echo 'oga: "'.$meta['_audio_ogg_url'][0].'",'."\n"; } ?> }); }, swfPath: "<?php echo get_template_directory_uri() ?>/assets/swf", cssSelectorAncestor: "#jp-interface-<?php the_ID(); ?>", supplied: "<?php echo implode(',',$formats); ?>" }); }
Hi I have an issue that I updated to version php 7.0 and jplayer stopped working on all my themes. Can you help me out?
http://demo.premiumwd.com/themes/ellion/blog/