Jwplayer not working

I downloaded the files and followed the steps given, but the player just doesn't work.

    <code>
    <html>
    <head>
    <script type="text/javascript" src="/jwplayer.js"></script>
    <script type="text/javascript" src="/jquery.js"></script>

    </head>

    <body>
    <div id="container">Loading the player ...</div>
    <script type="text/javascript">
    jwplayer("container").setup({
    flashplayer: "/player.swf",
    file: "/video.mp4",
    height: 270,
    width: 480
    });
    </script>
    </body>
    </html>
    </code>

      

All it shows is "Loading the Player". As you can see, I linked the JWplayer and jquery scripts. What am I missing? Any help would be greatly appreciated. I am using web expressions ... when I try to link jwplayer "jwplayer (container)" I say the link was not found.

+3


source to share


2 answers


Try this code. With a relative address, it works for me! Hope this helps you.



<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jplayer/2.9.2/jplayer/jquery.jplayer.min.js"></script>
        <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js/jquery.js"></script>
    </head>
    <body>
        <div id="container">Loading the player ...</div>
        <script type="text/javascript">
            jwplayer("container").setup({
            flashplayer: "//cdnjs.cloudflare.com/ajax/libs/jplayer/2.9.2/jplayer/jquery.jplayer.swf",
            file: "http://content.bitsontherun.com/videos/lWMJeVvV-364767.mp4",
            height: 270,
            width: 480
        });
        </script>
    </body>
</html>

      

+6


source


Just get rid of /

in the code so that it reads like this:



flashplayer: "player.swf"

      

+3


source







All Articles