Hello !
I have a JavaScript based Webpage to display the pictures of my webcam.
It perfectly works on any computer.
But it won't open on my P900. Here is the entire code :
// Variables:
// Trace - trace control
// URL - Url for image
// Interval update interval
public class JavaCam extends Applet implements Runnable
{
boolean boolean_Debug; // Debugging enabled/disabled
Image image_WebcamImage; // Image from Webcam32
Thread thread_This; // Thread for refreshing image
double int_Interval; // Interval between image refreshes ...
public static void main(String args[])
{
System.out.println("Webcam32's JavaCam: V1.1");
}
public void trace(String message)
{
if (boolean_Debug)
{
System.out.println(message);
}
}
public void destroy()
{
trace("Applet.destroy() called");
thread_This.stop();
}
public void start()
{
trace("Start called");
thread_This.resume();
}
public void stop()
{
trace("Stop called");
thread_This.suspend();
}
public void run()
{
trace("run(): Thread started!");
while (true)
{
try
{
// Put the refresh thread to sleep for the supplied interval
Thread.sleep((int)int_Interval*1000);
trace("Flushing image");
// Flush the image in the image buffer so we get a new one
image_WebcamImage.flush();
// Track the image and wait till its loaded
MediaTracker mediaTracker_track = new MediaTracker(this);
mediaTracker_track.addImage(image_WebcamImage, 1);
mediaTracker_track.waitForID(1);
// Repaint the image
repaint();
}
catch (Exception e)
{
trace("Caught:"+e.toString());
}
}
}
public void init()
{
String string_Url;
URL url_Webcam;
int int_Port;