Shop OBEX P1 Docs P2 Docs Learn Events
[Contest Entry] Multi-Socket Server - Page 4 — Parallax Forums

[Contest Entry] Multi-Socket Server

124»

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-10-09 09:51
    I'm using a linksys IP camera to stream live video from my home network to the web page. The camera is completely separate from the LEDs.

    The LED links send an HTTP request to the Spinneret exactly like the tutorial.
  • BillDerBillDer Posts: 33
    edited 2011-10-09 17:15
    Mike G wrote: »
    I'm using a linksys IP camera to stream live video from my home network to the web page. The camera is completely separate from the LEDs.

    The LED links send an HTTP request to the Spinneret exactly like the tutorial.

    Thanks for writing back.
    That is exactly my question, is how do you stream live video to the webpage and still maintain the led links?
    I would like to use a webcam and have the visitor click links to turn stuff on like you have done?
    I am new to the web server stuff, I can do the spin stuff however.
    Thanks.
    Bill
  • Mike GMike G Posts: 2,702
    edited 2011-10-09 18:41
    That is exactly my question, is how do you stream live video to the webpage and still maintain the led links?
    The web camera has nothing to do with the LEDs. I'm using a Linksys wireless IP camera model number WVC54GCA. The camera comes with instruction that shows how to access the camera with a browser. Feel free use the "View Page Source" of your browser to view and save the html that I used to create the page. The basic idea is the web page contains a < div > tag that wraps the video from the camera. That just lets me place the video where I want on the page.
    I would like to use a webcam and have the visitor click links to turn stuff on like you have done?
    Again the camera and LED links have nothing to do with each other. The code to light an LED using a hyperlink can be copied from the tutorial.
  • BillDerBillDer Posts: 33
    edited 2011-10-10 06:32
    Again the camera and LED links have nothing to do with each other. The code to light an LED using a hyperlink can be copied from the tutorial.[/QUOTE]

    OK, so when someone navigates to the site, the camera and the spinneret have the same address and respond independently of each other with the spinneret saving a location for the video to display?.
    Interesting, I have so much to learn.
  • Mike GMike G Posts: 2,702
    edited 2011-10-10 14:09
    BillDer wrote:
    OK, so when someone navigates to the site, the camera and the spinneret have the same address and respond independently of each other with the spinneret saving a location for the video to display?.
    No, the Spinneret and IP camera are at different IPs. Think of the web page as two boxes. One box has a video feed the other box sends commands to the Spinneret. The Spinneret is not connected to the camera in anyway.
  • LtechLtech Posts: 380
    edited 2011-10-11 00:00
    It is like the spinneret page has a open window (code) linked to the ip input of the camera ....
    So spinneret just tell the browser where to grab the video stream

    Just like youtube video on non-youtube pages on internet
  • Mike GMike G Posts: 2,702
    edited 2011-10-11 06:08
    Ltech wrote:
    It is like the spinneret page has a open window (code) linked to the ip input of the camera ....
    So spinneret just tell the browser where to grab the video stream

    Just like youtube video on non-youtube pages on internet
    That is NOT how it works!

    The purpose of the web page is simply to prove that there's no trickery going on. That commands are sent in real time to the Spinneret. The LED links call a RESTful service on the Spinneret through a proxy written in C#. I wrote the proxy to get past cross domain scripting errors in IE and some of the other browsers.

    Give me a bit and I'll post the code. It actually very simple.
  • Don MDon M Posts: 1,652
    edited 2011-10-12 08:56
    @Mike- I'd be interested in seeing the code as well. Thanks.
  • Mike GMike G Posts: 2,702
    edited 2011-10-13 06:10
    C# request handler attached. Again the handler's job is to accept an HTTP GET generated in JavaScript and forward the request to the Spinneret. I did this to get around cross domain JavaScript errors reported in IE. IE does not like it when the client HTTP request URL is different than the originating domain URL.

    The code is written in C#.

    ajaxhandler.aspx.zip
  • Don MDon M Posts: 1,652
    edited 2011-10-26 15:45
    Mike- I have been playing with your code a bit and in particular your webpage code for viewing the webcam / spinerret. I have been trying to view your page on an Android tablet (version 2.3). Evidently there is a problem viewing the Jave portion that shows the webcam. I can see the LED control panel buttons but there is no frame for the video portion.

    Have you tried viewing this page on an Android phone / tablet? Javascript is enabled on my devices.
  • Mike GMike G Posts: 2,702
    edited 2011-10-26 16:53
    My wireless IP camera is pretty old. It's not compatible with my Android phone even running locally over WiFi. Sorry...
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2013-10-01 11:50
    Mike, I just tried opening http://spinneret.servebeer.com:5000/ today and it's not loading. Is it still up?
  • Mike GMike G Posts: 2,702
    edited 2013-10-02 03:26
    The URL is http://spinneret.servebeer.com. The port was removed from the URL.
Sign In or Register to comment.