Skip to main content
Known Participant
Jul 15, 2010 2:29 PM UTC
Question

How to detect webcam connection in runtime

Hi,

Is there any way to detect webcam  and microphone connections in runtime in flex.Suppose the clients are participated in a videoconnference .One of clients joins the conference without webcam.In meantime he connects to webcam as he  in the conference.How to stream  that user video to all connected clints.Any suggetions appreciated.

Thanks

Srinivas

    This topic is closed to new replies. Start a new post to keep the conversation going.

    5 replies

    calmchessplayer
    Inspiring
    Jul 15, 2010 4:54 PM UTC

    this is how we detect if a camera is attached or not as Camera.getCamera() returns null if no camera is attached

    camera0=Camera.getCamera();

    if (camera0 == null){

    trace("camera0 is not attached");

    }

    Translate
    Known Participant
    Jul 16, 2010 6:10 AM UTC

    Hi,

    At the initial stage ,

    camera0=Camera.getCamera();

    if (camera0 == null){

    trace("camera0 is not attached");

    }

    will work.If user plugged the camera in runtime it won't detect

    Translate
    calmchessplayer
    Inspiring
    Jul 16, 2010 1:15 PM UTC

    well you could call a timer to continously check and then stop the timer once the if statement returns true. Just try some actionscript/logiic jeesh.

    Translate