我想在网页上流式传输我从服务器(使用 ffserver)接收到的实时视频。到目前为止,当我编写了一个非常简单的代码时:
<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 的实时流?谢谢。