2014-05-07 205 views
2

我在JWPlayer中使用自己的皮肤并播放YouTube视频。但视频犯规秀up.I我能坐上player.Here皮肤代码视频未播放JWPlayer

<!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> 
+0

你有联系吗? – emaxsaun

+0

它工作@EthanJWPlayer。我已经发布了下面的答案。不过谢谢。 – Diffy

+0

好极了,没问题。 – emaxsaun

回答

1

我从执行我的本地主机这段代码和它的工作

<!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> 
+1

很高兴你能工作。 – emaxsaun

1

JW Player使用Flash播放器在桌面浏览器交付YouTube内容的时刻。您需要取消注释flashplayer属性,如此小提琴演示中所示:http://jsfiddle.net/hZVHh/

如果未找到玩家外观,则可以防止玩家加载 - 确保您正确引用它。

+0

我已取消注释Flashplayer属性并使用skin 5.xml。现在皮肤出现,但视频不起作用。 – Diffy

+0

包含的js文件和Flashplayer是否正确?因为我已经从SO – Diffy

+0

复制它jQuery的URL不正确,我认为它只是演示代码。无论哪种方式,您都不需要jQuery来运行JW Player。如果你在你的浏览器上使用调试控制台,那么它应该告诉你怎么了,或者你可以发布一个链接到你的实际代码。 – edcs