Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internal network HTML/Java applet file sharing permissions

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.

like image 974
Caldwell Avatar asked Jul 18 '26 22:07

Caldwell


1 Answers

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):

The java applet in the webcam.html file is, by default, configured to stream at 1 frame per second. It is also configured by default to use “localhost” as the domain.

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:

Here’s an example of a webcam.html file with a maximum FPS of 60 and hosted on hacktivision.com:

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.)

like image 141
Paŭlo Ebermann Avatar answered Jul 21 '26 10:07

Paŭlo Ebermann