Video not playing IN JWPlayer

不想你离开。 提交于 2019-12-12 21:36:37

问题


I am using my own skin in JWPlayer and playing a youtube video. But the video doesnt show up.I am able to get the skin on the player.Here is the code

  <!DOCTYPE html>
<html>
    <head>
       <script type="text/javascript" src="http://player.longtailvideo.com/jwplayer.js"></script>
        <script type="text/javascript">jwplayer.key=mykey";</script>
    </head>
    <body>
        <div id="container">Loading the player ...</div>
        <script type="text/javascript">
            jwplayer("container").setup({
             flashplayer: "fwplayer.swf",
            file: "https://www.youtube.com/watch?v=1gniYetOxCo",
             skin: "myskin.xml",
            height: 270,
            width: 480
        });
        </script>
    </body>
</html>

回答1:


JW Player uses the Flash player to delivery YouTube content on desktop browsers at the moment. You need to un-comment the flashplayer property as demonstrated in this Fiddle: http://jsfiddle.net/hZVHh/

If the player skin isn't found then this can prevent the player from loading too - ensure you're referencing it correctly.




回答2:


I executed this code from my localhost and it worked

<!DOCTYPE html>
<html>
    <head>
       <script type="text/javascript" src="http://player.longtailvideo.com/jwplayer.js"></script>

    </head>
    <body>
        <div id="container">Loading the player ...</div>
        <script type="text/javascript">
            jwplayer("container").setup({
             flashplayer: "fwplayer.swf",
            file: "https://www.youtube.com/watch?v=yourVideo",
             skin: "mySkin.xml",
            height: 270,
            width: 480
        });
        </script>
    </body>
</html>


来源:https://stackoverflow.com/questions/23511203/video-not-playing-in-jwplayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!