求代码显示两个公共IP网络摄像头
我主要是ac/c++ 人。我已经完成了相当多的 PHP 工作,现在必须编写一些 JS 代码。
对于模型,我想制作一个网页,显示来自两个实时视频源的视频流。我们订购了基于 IP 的网络摄像头,我想这只是每个网络摄像头的使用情况
<img src="IP address">
,可能还带有一些图像尺寸标签。这是正确的吗?
与此同时,有人可以发布一些示例代码,最好是一些将在澳大利亚白天播放的视频源吗?你可以很有创意,但请一定要SFW。谢谢。
I'm mainly a c/c++ guy. I have done quite a lot of PHP stuff, and now have to code some JS.
For a mock-up, I want to make a web page showing the video stream from two live video sources. We have IP based web-cams on order and I presume it will just be a case of using
<img src="IP address">
for each web cam, with maybe some image size tags. Is that correct?
In the meantime, can someone post some sample code, preferably with some video feed which will be streaming during daylight hours in Australia? You can be cute creative, but please be SFW. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此代码使用“拉”方法在浏览器中更新 JPEG 图像。它的工作原理是更改 src URL 的查询字符串部分,以在最后一张图片完成加载十秒后强制重新加载图像(使用海滩网络摄像头图像的现场演示位于 http://jsfiddle.net/kLUkA/2/):
注意:你可以去掉refreshCamera中的setTimeout部分来消除重新加载延迟。
This code uses the "pull" method to update JPEG images within the browser. It works by changing the query string part of the src URL to force an image reload, ten seconds after the last picture has finished loading (a live demo using beach webcam imagery is at http://jsfiddle.net/kLUkA/2/):
Note: You can take away the setTimeout part in refreshCamera to eliminate the reloading delay.
我不确定
canvas
或video
元素,但我认为它们目前还不支持实时视频流。听起来您正在使用动态创建的静态图像,但如果您碰巧使用视频流,则必须使用 flash(或 silverlight 或其他等效项)。I'm not sure about the
canvas
orvideo
elements, but I don't believe they support live video streams as of yet. It sounds like you're using dynamically created static images, but if you happen to be using a video stream, you'll have to use flash (or silverlight, or some other equivalent).