Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

WebcamPublisher Hidden width/height Problem!

Avatar

Former Community Member

Is it me, or do the WebcamPublisher, AudioPublisher, and AudioSubscriber components have hidden widths and heights?  They seem to be taking up space in my layout!  I have gone in and physically set their dimensions to "0", yet they still appear to be taking up a few pixels of space.

For example:

<s:VGroup width="200" height="200">

     <rtc:WebcamPublisher width="0" height="0" id="webcamPub" />

     <rtc:WebcamSubscriber width="200" height="200" webcamPublisher="{webcamPub}" />

</s:VGroup>

results in the WebcamSubscriber being pushed down a few pixels:

+-----------------------------------------+ <---- VGroup

+-----------------------------------------+  <---- WebcamSubscriber

|                                          |

|                                          |

|                                          |

|                                          |

|                                          |

|                                          |

|                                          |

|                                          |

+-----------------------------------------+

+-----------------------------------------+

This is not going to work well and is a bit frustrating to say the least!

Am I doing something wrong, or is there a solution to this problem?

Thanks in advance!

Matt

2 Replies

Avatar

Former Community Member

Would it be better to instantiate the WebcamPublisher in an Actionscript function instead and completely remove the component from the MXML script?

Avatar

Former Community Member

Hi ,

It depends on your requirement. If you need to create the webcampublisher only under certain scenario within a component, then you might want to use Actionscript rather than using mxml to create with the component. However, if you don't have the restriction of dynamic creation , you can use mxml.

Lastly, putting anything in Actionscript gives you much more power to change,modify and destroy things than in mxml but then creating in mxml is more easier with just a line of code written by you.

Hope this helps

Thanks

Hironmay Basu