内网HTML/Java小程序文件共享权限
抱歉,如果我的标题不具体,我想不出更好的措辞方式。
情况是这样的。我设置了一个盒子来传输网络摄像头片段,我将其称为盒子 A。我在计算机上尝试获取该片段;我将我的计算机称为 Box B。(我在两台计算机上都使用 Ubuntu。)我几乎逐字按照此处的说明进行操作: http://hacktivision.com/index .php/2009/06/16/setting-up-an-ubuntu-webcam-server。
我正在使用“网络摄像头服务器”来设置它。我下载了 Apache2 并使用它来设置 Web 界面。 Box A 上的网络摄像头拍摄镜头并将其传输到“HTTP://localhost/webcam”。我正在尝试点击“HTTP://[Box A 的内部 IP]/网络摄像头”。然而,当我这样做时,它只是卡在“正在连接...”屏幕上。
我尝试点击 A 框的 /index,结果成功了。我还可以点击“[Box A 的内部 IP]:8888”,这会为我提供 Box A 上网络摄像头的快照。但出于某种原因,我没有从小程序(/webcam)接收数据。
我花了好几个小时试图解决这个问题,但没有成功。 Box B 是否需要某种权限才能使用 Box A 的小程序?或者也许我需要将 Box A 上的 HTML 文件公开?
请随时询问您需要尝试解决问题的任何信息。如果我遗漏了任何相关信息,我深表歉意。
Sorry if my title is unspecific, I couldn't think of a better way to word it.
Here's the situation. I've set up one box to stream webcam footage, I'll call it Box A. I'm on my computer and trying to get that footage; I'll call my computer Box B. (I'm using Ubuntu on both computer.) I followed the instructions here pretty much verbatim:
http://hacktivision.com/index.php/2009/06/16/setting-up-an-ubuntu-webcam-server.
I'm using "webcam-server" to set it up. I downloaded Apache2 and am using that to set up the web interface. The webcam on Box A take footage and streams it to "HTTP://localhost/webcam". I'm trying to hit "HTTP://[Box A's internal IP]/webcam". However, when I do, it just gets stuck at the "Connecting..." screen.
I tried hitting the /index of Box A and that worked. I can also hit "[Box A's internal IP]:8888", which gives me snapshots of the webcam on Box A. For some reason though, I'm not receiving the data from the applet (the /webcam).
I've tried to figure out this problem for quite a few hours, with no success. Is there perhaps some kind of permissions that Box B needs to use Box A's applet? Or maybe I need to make the HTML file on Box A public?
Feel free to ask for whatever info you need to try to fix the problem. I apologize if I left out any relevant information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,这是一个解决方案的想法。
如果您只是复制了小程序的 HTML 文件,则这适用(根据您链接的说明):
由于您的盒子 B 浏览器中的
localhost
引用了盒子 B,小程序会尝试连接到这台计算机...而这首先是不允许的(如果小程序未签名 - 不知道是否已签名) ,其次那里没有运行网络摄像头服务器。解决方案如下:
复制此示例,并将
hacktivision.com
替换为框 A 的 IP 地址(或计算机名称,如果您有内部 DNS 或合适的主机)配置)。(顺便说一句,我的 Ubuntu 11.04 似乎没有
webcam-server
软件包。)Okay, here is an idea for a solution.
If you simply copied the applet's HTML file, then this applies (from the instructions you linked):
As
localhost
in your box B browser refers to box B, the applet tries to connect to this computer ... and this firstly is not allowed (if the applet is not signed - no idea if it is), and secondly there is no webcam-server running there.The solution is in the following sentence:
Copy this example, and replace
hacktivision.com
with box A's IP address (or the computer name, if you have an internal DNS or fitting hosts configuration).(By the way, my Ubuntu 11.04 seems to have no
webcam-server
package.)