Camera preview not working in browsers

Hello,
I'm coding an applet to preview and record from browser, the problem is when I put applet tag in the HTML it doesn't' work on all browsers and no warnings or errors thrown! however when I run the applet in Eclipse it does work well!
I have:
JRE 1.6
JDK 1.6
JMF 2.1
Eclipse 3.4
and the code in it's simplest form:
import javax.media.NoPlayerException;
import javax.media.Player;
import javax.media.CaptureDeviceInfo;
import javax.media.MediaLocator;
import javax.media.CaptureDeviceManager;
import javax.media.Manager;
import javax.media.format.VideoFormat;
import java.awt.Component;
import java.applet.*;
import java.io.IOException;
import java.util.Vector;
public class WebcamPlayer extends Applet
    private CaptureDeviceInfo device;
    private MediaLocator media_locator;
    private Player player;
    private Component videoScreen;
    public void init()
        try
             Vector deviceList = CaptureDeviceManager.getDeviceList(null);
            device = (CaptureDeviceInfo) deviceList.firstElement();
            System.out.println("Chosen device: " + device.getName());
            media_locator = device.getLocator();
            player = Manager.createRealizedPlayer(media_locator);
            player.start();
            videoScreen = player.getVisualComponent();
            add(videoScreen);
        catch(Exception e)
}any suggestions?

Welcome to the Sun forums.
>
I'm coding an applet to preview and record from browser, the problem is when I put applet tag in the HTML it doesn't' work on all browsers and no warnings or errors thrown!
and the code in it's simplest form:>Good call.
>
catch(Exception e)
...any suggestions?>Confucius say "developer who [swallow exceptions|http://pscode.org/javafaq.html#stacktrace](1), will remain in the dark!".
(1) That is a link, BTW.
        catch(Exception e)
           // be very noisy about what went wrong
           e.printStackTrace();
...It can also be helpful (sometimes) to post an URL where we can see the broken applet.

Similar Messages

  • Camera is not working after Lumia Cyan update WP8....

    Hellooo Sir, I am Kailash Kumar from India (Uttar Pradesh). I have Nokia Lumia 620, I got this from my friend May 2014 and he bought it from Saudi Arbia and now it is out of warrently..
    when I got this its front camera was not working But rear(back) works fine with flash, But after some days I Updated it to win8.1 with Preview of Devloper, and after updating my Camera has Stoped working when I click the Camera Button, within a second it comes to Home Screen..... So I Downgrade to Win8.0 OS via Nokia Software Updater and My Camera Start Working again....
    Someone Suggest me to wait for official realese of Lumia Cyan with W8.1 OS and I waited for it and In August last My phone shows that a Update is Available and Now Update it again Officialy to Win8.1 with Cyan Update via Wifi, and the Same problem Again Happening My Camera Stopped working again after click the Camera Button, within a second it comes to Home Screen, I tried everything, Soft reset, Hard Reset, Uninstalling Nokia Camera App & Installing Again, Reset Camera Button.... But the problem remain Same, Stil Camera is not working.........
    I go for the nearest Customer Care Service, they told me I Updated it via Wifi and they will update it with PC Charges Rupee 450/- But I didn't give my phone to Care.... After a Day I updated it Via PC from NSU 4.2.1 (I think Customer Care will do the Same) But the Problem Remaining Same Camera Stil is not working......
    PLEASE HELP ME SOMEONE WITH THIS PROBLEM.. HERE ARE SOME MORE INFO OF MY LUMIA 620:-
    1- FIRST IT IS OUT OF COUNTRY (SAUDI ARBIA) AND OUT OF WARRENTY...
    2- OS VERSION: - 8.10.12393.890
         FIRMWARE REVISION NO. : 3058.50000.1425.0002
         HARDWARE REVISION NO. : 5.0.2.0
         RADIO SOFTWARE VERSION : 2.0.242037.8
         CHIP SOC VERSION : 82207
    I WILL HIGHLY THANKFULL TO YOU.
    Moderator's note: The attachments were removed as it contain the phone's IMEI. For security purposes, avoid posting any of your presonal information on public forums like this.

    try hard reset and see if it works and let me know if it does. take phone off. press (green call) key, (*) key, (3) key and power button then wait for phone to come on then let go of keys.

  • Preview not working!!! Blank document appears!

    My Preview stopped working! I downloaded a few PDF documents, thinking that Preview would automatically launch and open the files. Preview did launch, however, all I saw were blank white documents, nothing on them.
    Next thing I did was open my Adobe Reader application and tried to read the PDF documents. Yes, it worked. I was able to see the documents.
    But why is Preview not working correctly? What is happening?

    Hi, Makiko. The version of Preview that came with Panther is old, and some of the features that newer PDF-creation software can build into PDF files may not be supported by it. In other words, your Preview application became static several years ago, while the PDF file format has continued to evolve. Your Preview can probably still open all the other file formats that it opened when it was new, but you may want to set things up so that all PDF files are handled by Adobe Reader instead. To do that, click once on any PDF file in the Finder and choose Get Info from the File menu. In the "Open with" section of the Get Info window, choose Adobe Reader from the drop-down menu, then click the Change All button. Close the Get Info window. Now all PDFs that you double-click will open in Adobe Reader.
    Note that at present, the latest version of Adobe Reader that works in Panther is 7.1.0. If you have an earlier version, you may want to update it.

  • My camera is not working when ever i open cam apps its stucks.

    After upgrading to iOS7 on IPAD 2 the back camera is not working only get a black screen switing to front camera it works once then freezes

    Have you tried to force quit the camera app? Double tap the home button. Scroll sideways if needed until you see the camera preview, then flick that preview up and off the screen. Then either single tap the home button or tap on the home page preview to exit the mode.

  • I updated my iPad 4 iOS 8.0.2 and the camera does not work, ... Please help

    I updated my iPad 4 iOS 8.0.2 and the camera does not work and hangs and unconnected, .... Please help me in this question,... Thanks in advance

    You're welcome, but I didn't do anything. Try closing the camera app completely and reset your iPad and maybe that will help.
    In order to close apps, you have to drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • Iphone 4 camera flash not working.

    Iphone 4 camera flash not working when taking pictures but works with the flashlight app. I have ios 7. Tried factory reset. My wife has the same problem with her iphone 4 since the first month she has had it. Any suggestions?

    and what have you done to try and fix the situation?  Have you taken the steps recommended in the User Guide?

  • My camera does not work on my ipod touch 4th gen. it just goes to a black screen i have done everything from resetting and rebooting... help :(

    I fell down the stairs the other day and busted my other ipod to the gamewerks near my house. the guy said he couldnt fix that ipod so he gave me a new one.. a better one a 32GB, the broken one was 8GB. but he told me the only bad thing is that the camera does not work and he doesnt know why... he just couldnt get it to workkk... any ideas on whats wrong?

    Try the following:
    - A reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory settings/new iPod.
    If you still have the problem that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order

  • My camera does not work on my macbook, any suggestions to fix it?

    my camera does not work on my macbook, any suggestions to fix it?

    Here are Applle's troubleshooting steps....
    support.apple.com/kb/HT2090

  • I just bought an Iphone4 from straight talk and my camera does not work. The shutter wont open and when it does open there is a black screen. I am very upset. I have wanted this phone for awhile and now that I have it, it does not work properly. Need help

    I just bought an Iphone 4 from straight talk. My camera does not work. The shutter does not open and when it does open there is a black screen. I am very upset. I have wanted this phone for awhile. I want the issue fixed.
                                                                                                                                                     Thanks

    Take the iPhone to an Apple store genius bar for testing, and if it is defective and under warranty they will replace.  Since you say iPhone 4, was this a used or refurbished iPhone? 

  • I have done absalutely nothing to my 4g apple ipod touch, and it over heats, won't hold a charge, and the front camera will not work. I bought this brand new in december, and i've barely used it. I've tried restarting it and everything, what should i do?

    I have done absalutely nothing to my 4g apple ipod touch, and it over heats, won't hold a charge, and the front camera will not work. I bought this brand new in december, and i've barely used it. I've tried restarting it and everything, I honestly think this is out raging because i spend over $200 on this. To have for music and instagram. I use it about an hour a day, but i've only been using it for about 3 months although i've had it since December. Any suggestions that may help me?

    Try:
    - A reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory settings/new iPod
    If still problem make an appointment at the Genius Bar of an Apple store.

  • Help, web cam is not working properly with win vista

    Hii.. my web cam is not working properly with win vista..even if the icon appears bt it does nt start.. its
    lenovo easy capture 2.5...so if u cud suggest me anything...
    Moderator note; subject edited

    re-install drivers and try again. ( also easy capture )

  • My integrated web cam is not working

    I Am using hp pavilion p001tx laptop. My web cam is not working
    It shows a warning
    No web cam detected. Try to plugging in a webcam into your computer now. If you are using an integrated camera, Make sure that it is turned on.
    Help me please.
    My laptop serial number is [Personal Information Removed]

    Check if the drivers are installed or not.
    Try to update the camera drivers and restart the system.
    You can also go to device manager setting and see if the webcam is disabled or not.
    If everything fails try system resore or run OS recovery.

  • HP Compaq web cam is not working

    I have Hp Compaq  Notebook 620. The devices have 2MP Web Cam but the Web Cam is not working. When i try to make it on, its shows error
    "No webcam detected. HP Webcam will now Close"
     Please suggest the solution of the problem.

    Hello Manishshakya,
    I see that you are having problems with the webcam on your computer. The unit you have is a HP commercial unit.
    I would suggest posting your problem in the HP Commercial Forum as well. There are more users with the computer you have on this board and it is specific to your computer.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • My HP-Pavilion dv6 web cam is not working properly, fluctuating always

    My HP-Pavilion dv6 web cam is not working properly, it is fluctuating always

    re-install drivers and try again. ( also easy capture )

  • Web-Cam does not work on Lenovo G480, PLEAS HELP!!

    Hello,
    I have a Lenovo G480 (20165), and my built-in Web-Cam is not working.
    When I enable it by pressing Fn+Esc the little light by the Web-Cam turns on, then shuts off after a second.
    So I downloaded the Lenovo Easy Capture, and when I open the software, I get a message saying "Failed To Open Camera".
    And when I turn on my laptop, the little light comes on for a short moment, then the light shuts off.
    I don't know what to do, It's a brand-new laptop and I've never been able to get the Web-Cam to work, not even on Skype.
    I would REALLY appreciate the help. Thank you!

    Have you installed camera drivers from the us support site? Try reinstalling them
    Win 7
    http://download.lenovo.com/consumer/mobiles/0qca12ww.exe
    http://download.lenovo.com/consumer/mobiles/0lca12ww.exe
    Win 8
    http://download.lenovo.com/consumer/mobiles/0qca08w8.exe
    http://download.lenovo.com/consumer/mobiles/0lca11w8.exe
    Ishaan Ideapad Y560(i3 330m), Hp Elitebook 8460p!(i5-2520M) Hp Pavilion n208tx(i5-4200u)
    If you think a post helped you, then you can give Kudos to the post by pressing the Star on the left of the post. If you think a post solved your problem, then mark it as a solution so that others having the same problem can refer to it.

Maybe you are looking for