如何在JW Player中嵌入youtube视频

时间:2014-04-24 10:39:22

标签: javascript jwplayer

我在JW播放器中使用以下代码在我的服务器上嵌入youtube视频

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="tr">
<head>
<script type="text/javascript" src="jwplayer/jwplayer.js"></script>
<meta name="keywords" content="foreign trade, hazelnut, livestocks, sunflower, rice, wheat, lentil, sunflower oil" />
<meta name="description" content="Comparative Nutrition Values: Brown & White Grain Rice table" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" />
<meta http-equiv="expires" content="01 jan 1970 00:00:00 gmt" />
<meta http-equiv="last-modified" content="01 jan 1970 00:00:00 gmt" />
<meta http-equiv="if-modified-since" content="01 jan 1970 00:00:00 gmt" />
</head>

<body>
<div id="movieframe">
<script type="text/javascript" src="jwplayer/jwplayer.js"></script>
<div id="mediaspace" style='width:640px;height:480px;'></div>
    <script type='text/javascript'>
        jwplayer('mediaspace').setup({
            'flashplayer': 'jwplayer/jwplayer.flash.swf',
            'file': 'http://www.youtube.com/watch?v=uelHwf8o7_U',
            'controlbar': 'bottom',
            'width': '640',
            'height': '480'
        });
    </script>
</div>
</div>
     </body>

</html> 

但是使用此代码我收到错误 error loading youtube embedding not allowed 。 我认为有一些许可证问题。所以请告诉我该怎么做。我是否需要购买东西。

0 个答案:

没有答案