0
我想在網頁上流式傳輸從服務器(使用ffserver)接收的視頻。到目前爲止,當我寫一個非常簡單的代碼:使用video.js播放實時流媒體
<head>
<script src="http://www.andy-howard.com/js/libs/jquery-1.8.2.min.js"></script>
<link href="http://vjs.zencdn.net/4.12.6/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.12.6/video.js"></script>
</style>
</head>
<body>
<video id="video1" class="video-js vjs-default-skin" width="640" height="480" controls="controls"
preload="auto" poster="http://upload.wikimedia.org/wikipedia/commons/thumb/4/41/NYC_Times_Square_wide_angle.jpg/640px-NYC_Times_Square_wide_angle.jpg" >
<source src="http://10.172.180.235:8090/live.flv" type="video/x-flv">
</video>
</body>
然後它不起作用。但是,當我更換行:
<source src="http://10.172.180.235:8090/live.flv" type="video/x-flv">
這一個:
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
然後我可以看到流,但它來自一個文件...是否有顯示在我的網頁的方式來自ffserver的直播流?謝謝。