Search code examples
firefoxjsonpmime-typesjplayer

JPlayer not playing only in Firefox using JSONP


I am using JSONP to wrap the JSON response. Works fine in Chrome, IE and Safari.

The MIMEtype from the PHP script I am referencing is sending Content-Type:text/html

which may be the issue as I found this answer

https://groups.google.com/forum/#!topic/jplayer/Bv5fUoXqgew

here it is http://www.freeenergymedia.com/shared/PLAYER/player/player.html


Solution

  • changed this

    $(document).ready(function() {
    
    
        $.getJSON("http://www.freeenergymedia.com/getxml2.php?callback=?", {},function (json) 
        {
    
            new jPlayerPlaylist({
                jPlayer: "#jquery_jplayer_1",
                cssSelectorAncestor: "#jp_container_1"
            }, json, {
                swfPath: "js",
                supplied: "mp3, ogg",
                wmode: "window"
            });
        })
    });
    

    to this

     $(document).ready(function() {
    
    
            $.getJSON("http://www.freeenergymedia.com/getxml2.php?callback=?", {},function (json) 
            {
    
                new jPlayerPlaylist({
                    jPlayer: "#jquery_jplayer_1",
                    cssSelectorAncestor: "#jp_container_1"
                }, json, {
                    swfPath: "js",
                    supplied: "mp3",
                    wmode: "window"
                });
            })
        });