Expand my Community achievements bar.

websubscriber component is not working with itemrenderer

Avatar

Level 1

Hi All

In my chat application I am creating a list of members with their video feed. For video feeds I am using web subscriber component.

Right now I am doing this via repeater component, i know repeater is not good option compared to item renderer. But when I try to achieve same result using item renderer,
Problem is subscriber component inside item renderer is not getting any video feed.

Another issue with websubscriber component by default it is taking 5px padding from left due that I am unable to align this with its parent container border .

Looking for suggestions

Thanks,
Ritesh

3 Replies

Avatar

Level 1

Following is my app code..

<!-- VideoChat.mxml -->

<mx:Script>

            <![CDATA[ 

protected function Session_synchronizationChangeHandler(event:SessionEvent):void

                  {                       

            this.list.itemRenderer = new ClassFactory(MembersItemrenderer);

                  }

            ]]>

</mx:Script>

<rtc:AdobeHSAuthenticator

            id="auth" userName="guest" password="password" />

<rtc:ConnectSessionContainer synchronizationChange="cSession_synchronizationChangeHandler(event)" id="cSession" authenticator="{auth}" width="100%" height="100%" roomURL="yourroomurl" >

<mx:List width="100%" height="100%"  id="list"dataProvider="{cSession.userManager.userCollection}"/>

</rtc:ConnectSessionContainer>

<!-- MembersItemrenderer.mxml -->

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

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

            horizontalAlign="left" horizontalGap="0" xmlns:rtc="http://ns.adobe.com/rtc"

            implements = "mx.controls.listClasses.IListItemRenderer" >

      <mx:Script>

            <![CDATA[

                  import com.adobe.rtc.sharedManagers.descriptors.UserDescriptor;

            ]]>

      </mx:Script>     

      <rtc:WebcamSubscriber  displayUserBars="false" id="membersWebcamSubscriber"  publisherIDs="{[(data as UserDescriptor).userID]}" />

      <mx:Label text="{[(data as UserDescriptor).displayName]}"  />

  </mx:HBox>

Avatar

Level 3

try

<mx:List width="100%" height="100%"  id="list" itemRenderer="MembersItemrenderer" dataProvider="{cSession.userManager.userCollection}"/>

I dont think a WebcamSubscriber has a padding at all.

since this may be an issue with the itemrenderer it may be a good idea too post this in another forum.