Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

allow only users with webcam activated

Avatar

Former Community Member

Hey guys,

is it possible to allow only users, who first of all have a webcam pluged in and second also allowed streaming this webcam in the little popup dialog?

Any other users shouldn't be allowed to join the room.

Thanks,

Stefan

5 Replies

Avatar

Employee

You can do all your tests before "connecting" (before you call ConnectSession.login()) and disable the connection if your prerequisites are not satisfied.

You may not be able to check the video requirements using a WebCamPublisher before you are connected so you may have to put up a "fake" video pod

(maybe you can use it to take a "picture' of the user to use it as an avatar )

Avatar

Former Community Member

Hi,

You can check the cameras installed in your system by caling camera.names API in flash.media.Camera. You should do this before calling ConnectSession.login() as raff mentioned. The names API returns an array and if the array is empty i.e. no cameras installed, you can pop a dialog saying the user can't enter the room.

Regarding streaming, any user who has a camera and is in the room as a publisher role(=50) can publish his camera.

Hope this helps.

Thanks

Hironmay Basu

Avatar

Former Community Member

I have to program this kind of functions into the .swf file, right?
Can you tell me how to read the camera.names API in flash.media.Camera in detail?

Is there a possibility to check whether the user accepted the little popup dialog asking for webcam and mic authorization?

Thanks!

Avatar

Former Community Member

Hi,

I think what is meant is that all this should be done on the client side -

IConnectSession has a login() method, and you can wait until the webcam is

confirmed and accepted before calling it.

nigel

Avatar

Former Community Member

Hi ,

In your actionScript code , you call Camera.names ( it's a static) and get the array of cameras installed. This API doesn’t throw Flash Player privacy dialog box( details in Flash.media.Camera documentation)

e.g.

if ( Camera.names.length == 0 ) {

// no camera in installed .

}

Regarding checking for acceptance, when you call cam = Camera.getCamera() followed by video.attachCamera(cam) for capturing , it will throw you the pop-up dialog asking for for webcam and mic authorization the first time. You can also get this dialog any time by calling Security.showSettings(SecurityPanel.PRIVACY);

Flash Player returns an information object in the status event that indicates the user's response for this dialog: Camera.muted indicates the user denied access to a camera; Camera.Unmuted indicates the user allowed access to a camera. To determine whether the user has denied or allowed access to the camera without handling the status event, use the muted property.

You need to add the Status event handler to your cam/mic and in the handler you can see the muted property.

Please refer to our WebcamPublisher.as class and look for statusHandler function where we check the user response. You should also read the getCamera() API doc inside flash.media.Camera for more details.

Hope this helps

Thanks

Hironmay Basu