lundi 30 janvier 2017

In flash as3 webcam how to get newly connected webcam name at run-time?

I have a flash as3 based webcam video recorder that publishes the webcam video stream and to do this i am using the following codes :

var camera:Camera = Camera.getCamera(0);
var arr:Array = Camera.names;
if(camera != null)
    videoWidth = topBorderContainer.width;
    videoHeight = topBorderContainer.height;
    camera.setMode(videoWidth, videoHeight, 30, false);
    camera.setQuality(0, 100);
    if (camera)

But problem is that if i am connecting a new document camera at run time and running my webcam tool then Camera.names returning the previously connected document camera name instead of returning the new document camera name.

And to get new document webcam name i have to restart my application again.

But i have no knowledge how to get newly connected document camera name at run time so if anybody know how to get the newly connected document camera name at run time please help me to solve.

Aucun commentaire:

Enregistrer un commentaire