Expand my Community achievements bar.

SOLVED

autostart webCam on room entering

Avatar

Former Community Member

Hey,

i'm wondering how i can "autostart" the users webcam when he joines the room and has accepted the "little flash acception popup".

So just instead of click on "start my camera" autostart the web camera.

I already gave the camera an ID:

and tried the following

in the <mx:Application tag.

But it didn't work at all.

Can you give me a hint how to realize that?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi ,

You should do it in the CreationComplete handler of ConnectSessionContainer and not applicationComplete.

Here is an example I tried that works for your case.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

xmlns:rtc="AfcsNameSpace" layout="absolute" width="100%" height="100%" >

<mx:Script>

<![CDATA[

private function onCreationComplete():void

{

webCamera.startWebcam();

}

]]>

</mx:Script>

<rtc:AdobeHSAuthenticator id="auth" userName="XXXXX" password="XXXXX" />

<rtc:ConnectSessionContainer id="cSession" authenticator="" width="100%" height="100%"

roomURL="XXXXXXXXXXXXXXXXXXXx" creationComplete="onCreationComplete()" >

<mx:HBox top="10" right="10" left="10" bottom="10" verticalGap="6" horizontalAlign="center">

<mx:VBox width="100%" height="100%" >

<rtc:WebCamera width="100%" height="100%" id="webCamera" />

</mx:VBox>

</mx:HBox>

</rtc:ConnectSessionContainer>

</mx:Application>

Hope this helps.

Thanks

Hironmay Basu

View solution in original post

1 Reply

Avatar

Correct answer by
Former Community Member

Hi ,

You should do it in the CreationComplete handler of ConnectSessionContainer and not applicationComplete.

Here is an example I tried that works for your case.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

xmlns:rtc="AfcsNameSpace" layout="absolute" width="100%" height="100%" >

<mx:Script>

<![CDATA[

private function onCreationComplete():void

{

webCamera.startWebcam();

}

]]>

</mx:Script>

<rtc:AdobeHSAuthenticator id="auth" userName="XXXXX" password="XXXXX" />

<rtc:ConnectSessionContainer id="cSession" authenticator="" width="100%" height="100%"

roomURL="XXXXXXXXXXXXXXXXXXXx" creationComplete="onCreationComplete()" >

<mx:HBox top="10" right="10" left="10" bottom="10" verticalGap="6" horizontalAlign="center">

<mx:VBox width="100%" height="100%" >

<rtc:WebCamera width="100%" height="100%" id="webCamera" />

</mx:VBox>

</mx:HBox>

</rtc:ConnectSessionContainer>

</mx:Application>

Hope this helps.

Thanks

Hironmay Basu

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----