jwplayer播放链接视频

时间:2012-06-10 21:45:15

标签: jwplayer

HTML / JS:

<html lang="en">
<head>
    <script type="text/javaScript" src="javascript/bootstrap/js/bootstrap.js"></script>
    <script type="text/javaScript" src="javascript/jquery/jquery-1.7.1.js"></script>
    <script type="text/javascript" src="javascript/jwplayer/jwplayer.js"></script>
    <link rel="stylesheet" type="text/css" href="javascript/bootstrap/css/bootstrap.css">
</head> 
<body>
    <div class="container">
    <div class="row">
        <div class="span12 page-header ">
            <h1>
                Videos
            </h1>   
        </div>  
    </div>  
    <div class="row">
      <div class="span12" id="vid">
            video will go here.
      </div>

    </div>
</div>

<script>
    jwplayer("vid").setup({
        flashplayer: "javascript/jwplayer/player.swf",
        file: "d2rlstwcyqj5nz.cloudfront.net/01.03.12.mp4",
        height: 270,
        width: 480
    });
</script>
</body>
</html>

如果我直接在浏览器中打开d2rlstwcyqj5nz.cloudfront.net/01.03.12.mp4,则会下载视频。但在上面的代码中,播放器找不到视频。为什么呢?

enter image description here

1 个答案:

答案 0 :(得分:2)

尝试在开头添加http://