PDA

View Full Version : Web Browser



AKsor
December 17th, 2009, 10:23 AM
Hi Gang

I'm new to Netremote 2 and I'm trying to embed a webcam image that is hosted by webcamXP Pro.

The problem I have is:

I created a button set its button properties as webbrowser then created a button action as set browser content.

webcamXP can generates html code for each camera and I'm trying to use this code as the browser content but when I copy and paste the code all I get is the first <html> code the rest is missing.

I'm not sure that this is the way to go or there is different way to do things.

Please help me the documentation is kind of limited. :confused:

I wish I knew were everybody get's all the advanced information that i do not see in any of the documentation. :roll:

Thanks

Rob H
December 17th, 2009, 05:50 PM
Can you show the html?

Normally you would use a URL rather than the literal page contents

AKsor
December 17th, 2009, 06:28 PM
Here is the HTML Code

<html>
<head>
</head>
<img src="http://192.168.15.33:3500/loading.jpg" class="webcam" id="webcam1" width="320" height="240" alt="Live Stream" />
<script type="text/javascript">
<!--
currentCamera1= 1;
errorimg1= 0;
document.images.webcam1.onload = DoIt1;
document.images.webcam1.onerror = ErrorImage1;
function LoadImage1()
{
uniq1 = Math.random();
document.images.webcam1.src = "http://192.168.15.33:3500/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
document.images.webcam1.onload = DoIt1;
}

function ErrorImage1()
{
errorimg1++;
if (errorimg1>3){
document.images.webcam1.onload = "";
document.images.webcam1.onerror = "";
document.images.webcam1.src = "offline.jpg";
}else{
uniq1 = Math.random();
document.images.webcam1.src = "http://192.168.15.33:3500/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
}
}
function DoIt1()
{
errorimg1=0;
window.setTimeout("LoadImage1();", 40);
}
//-->
</script>
</body>
</html>

Rob H
December 17th, 2009, 07:10 PM
And how do you look at this in an ordinary web browser?

AKsor
December 17th, 2009, 07:24 PM
I place it into a file with the html extension and double click on it

I just figured out that I can use a url such as

<http://192.168.15.33:3500/cam_1.jpg>

to get it to update just reload the url

AKsor
December 18th, 2009, 11:19 PM
I figured it out :rolleyes:

webcamXP will generate the HTML code for each camera that you want to embed into a browser.

It can generate 3 different versions of html code Javascript, M-Jpeg, or Flash
It also has a root folder for its web server.

I created an html file for each of the cameras I want to view in Netremote and I use a dedicated button to load up the url in the browser.

I found that the flash based html code works the best with Netremote web browser.

VicVonDoom
January 6th, 2010, 11:39 AM
I'm quite interested in the flash version of this! would you mind posting how you got the flash client working with nr? what's the code look like?

I'm looking for something that doesn't use javascript, flash might be a solution!

VicVonDoom
January 6th, 2010, 03:54 PM
I just downloaded and tried on XP.

I made a quick ccf with a frame containing a button.
The button was an "embedded flash player component" and the file path to the flash file was "C:\Program Files\wLite\WebFiles\flashMJPEG.swf".
(that was generated by WebcamXP)

Seems to come up ok on an XP machine hosting WebcamXP & the .swf & Netremote, I'll try making the file/folder shared & have a go on some other client devices once the beers worn off....

AKsor
January 8th, 2010, 03:30 PM
I just went under the option of generating the html code then in there i selected the camera and flash based code I think you have 3 options Mjpeg, Java or flash.

I copied the html code into a text file and renamed it to camx.html then placed the file into the girder webserver rootfolder.

I then created a button that loads up the url in a webbrowser with no scrollbars

From my experience flash is the most responsive out of all the other formats.