Page 1 of 1

Http Server

Posted: Thu Feb 26, 2004 10:32 pm
by Stryder
Is there anyway to allow extra file types to be served by the Http server?

I like the way the live stream works through Java, and I have a way that I use to create the live stream to a website through an IFRAME when I'm online, and for the website to work out if I'm online or not.

The thing is this particular method uses a .JS file served on the HTTP Server I run when I'm online.

An explaination of how it works:

I place these into the < HEAD > tags of the constantly online HTML page (one thats served all the time).

Code: Select all

<SCRIPT LANGUAGE="Javascript">var Livefeed;</SCRIPT>
<SCRIPT LANGUAGE="Javascript" SRC="Http://home.mydomain.com/livefeed.js"></SCRIPT>
(If someone copied this they would put their IP address to the HTTP server they run on the computer they serve the camera from, instead of home.mydomain.com)

They have to be placed in that order as first var Livefeed; is declared, then if your online the file can be pulled from your server, if not Livefeed is a null value.

An entry inside the < BODY > tag is another SCRIPT tag, as follows.

Code: Select all

<SCRIPT LANGUAGE="Javascript">document.open();
if(Livefeed==1){
// The if means, If your online Livefeed=1, if not then its something else
document.write('<IFRAME NAME="Stryder" BORDER="0" FRAMEBORDER="NO" FRAMESPACING="0" ');
document.write('SRC="Http://home.mydomain.com" HEIGHT="240" WIDTH="320" HSPACE="0" ');
document.write('VSPACE="0" MARGINWIDTH="0" MARGINHEIGHT="0" NORESIZE="NORESIZE" SCROLLING="NO" ');
document.write('TITLE="Stryder" ALIGN="CENTER"></IFRAME>');
} else {
document.write('<IMG SRC="images/special.jpg" ALT="Neat Hey?" WIDTH="320" HEIGHT="240">');
}
document.close();</SCRIPT>
Thats whats contained in the HTML code.
Whats in the Livefeed.js file thats served on my HTTP server with the camera is this:

Code: Select all

Livefeed=1;
Thats it. You don't call it a var because that was already defined by the HTML page, it just gives the var that already exists the value of "1".

You can see all this in work at http://chatsoba.sprawl-vr.com

Re: Http Server

Posted: Fri Feb 27, 2004 3:43 pm
by malun
Stryder wrote:Is there anyway to allow extra file types to be served by the Http server?
No, not at the moment, but I can easily add file types in the next release. I promise to add support for .js :D

/malun