Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Wecam Pod

Avatar

Level 3

Hi, does anyone have the webcam pod working with audio integrated into it. Having audio missing is like having the fileshare pod without download.

I have tried myself but I cannot get anything into the toolbar. I can see that there is a flash file, but I cannot see where it is integrated. I cant even change the font size of the display name.

Also a couple of questions on it:

How would I get the video to be 100% width of the canvas that it is in?

How would I have the toolbar at the bottom instead of the top?

For me at least there seems to be a long lag of up to 30 seconds when I click the pause or close buttons.

Am I right to put the webcam pod into a tileList, it seems to behave strangely some times. I am putting this down to the fact that I have to copies of the app running with only on webcam installed onto my pc.

<mx:TileList selectable="false" borderColor="#000000" borderThickness="2" id="tile" rowCount="2" columnCount="2" width="100%" height="100%" dataProvider="{cSession.userManager.webCamCollection}" borderStyle="solid" paddingRight="0" paddingTop="0" paddingLeft="0" paddingBottom="0">

<mx:itemRenderer>

<mx:Component>

<mx:HBox width="100%" backgroundColor="Red"

>

<rtc:WebCamera id="camera1" width="100%" height="100%"

/>

</mx:HBox>

</mx:Component>

</mx:itemRenderer>

</mx:TileList>

Thanks, Keith

5 Replies

Avatar

Former Community Member

Hi,

WebcamPod doesn't have Audio Integrated with it. The camera and audio streams are handled seperately by the StreamManager class. You can use AudioPublisher and AudioSubscriber to get the audio working. But the audio will work seperately. If you want the audio to work along side with camera, you can either override functions in WebCamera so that when you press the play button in WebCamera, you also call audioPublisher.play()  method and you have audioSubscriber instance created for listening. For details of how AudioPublisher and AudioSubscriber work, you can either look at Audio example or DefaultPods example.

Another way is ,you can also use instead of WebCamera pod itself, the underlying WebcamPublisher and WebcamSubsriber so that when you call webcampublisher.play(), you also call audioPublisher.play() and so on.

Regarding getting 100% width of the canvas, currently the Webcamsubscriber lays out the streams in a grid format following some layout algorithms. You need to override WebcamSubsriber's layoutCameraStreams method to have your own layout and filling up complete canvas place if you have one video. There is an example called zoomLayout and MyWebcamSubscriber file inside which does some customlayouts. You can look through that example to get ideas on it.

The toolBar is also laid out in the same layoutoutCameraStreams  function. You can get it laid out in the bottom by overriding the layoutoutCameraStreams function in WebcamSubscriber. These are the relevant lines for laying out toolbar that are currently in the layoutCameraStreams function.

var cBar:CameraUserBar = _cameraUserBarObj[id];
cBar.x = vC.x;
cBar.y = vC.y; //Note: with new spec , the name sho

cBar.setActualSize(vC.width, cBar.measuredHeight);

I am not sure about the reasons of  30 sec delays. Does it happen with only pause and stop or when you  click start button also?

Hope this helps.

Thanks

Hironmay Basu

Avatar

Level 3

Hi Hironmay ,

Thanks for the help. I hope you can see where I am coming from with the audio being standard with the webcam pod. I can understand the benefit of have webcamsubscrider and audiosubscrider seperate. But surley the essence of a pod is an doing package, again like the file share.

I know it is staright forward to call the <rtc:AudioPublisher id="audioPub"/><rtc:AudioSubscriber/> but it would be so much neater to have an audio button beside the pause/play camera button.

I dont want to even attempt to build my own component. You guys have put so much work into the webcam pod I would be programing for ever to do similar.

I will give it a go adding audio to the pod. From what you have said it should be straight forward. I will let you know if I run into any difficulty.

Am I right using the tileList to display the pod?

Thanks

Avatar

Former Community Member

Hi,

The WebcamPod by itself renders all the video stream it is displaying in a grid format. So, any container should be ok. In fact, if you just add it by itself, it will be fine as you can see the DefaultPods example. I am not sure qhat your requirements are , but unless you need multiple webcampods ( each will show all the video streams unless you are showing specific streams to it), using TileList doesn't make sense.

If you are looking at the WebCamera Example, there we wanted to show just user's own single stream per pod to specifically demonstrate the capability to show specific streams in a pod rather the default which shows all streams. If you don't have such specific requirements, any Container or the pod by itself is ok.

Regarding audio, we kept it seperate so that users can have the flexibility to use it alone or if they want it with camera as in your case, he can  just publish/stop the audio also when he publishes/stops camera.

Thanks

Hironmay Basu

Avatar

Level 3

Thanks, I thought alright that I was following the wrong path as regards to putting the pod in a tileList. I was just repeating the first camera. Sorry because I am limited to one camera on my pc, I have not been able to properly test multiple streams.

I will switch to the webcamsubscrider instead with the tile list. I have noticed that when using the webcam example if I have two users streams displayed. My own and another. I have access to pause and play my own stream naturally, but strangely I have acces to the other stream's camera bar too,and I can stop their stream. Should I only see their display name and only they should have access to stop and start their cam?

As regards to a delay in the stop and pause of the camera stream. It was just my internet connection, I was using a mobile connection which didnt seem to like the camera stream. I tested on another pc with a wired broadband, worked fine.

Just on another note if I can pick your brain again regarding Adobe Stratus and RTMFP. I have read the previous posts and looked at the example on it and it is straight forward. I will have four users max in a room with audio and camera, I will insist that they have player 10 installed, so am I right to use it or is their any issues with AFCS that I have not considered?

Keith

Avatar

Former Community Member

Hi,

If you use webcam pod, it already has the webcamsubscriber inside which will show all the streams in a grid format.

Regarding pausing and closing other's stream, If you are a host or owner(role=100), you can see the bar on every stream that is shared and you can stop or pause/play other's stream. If you are a host and pause other's stream, it will be paused for you but for all other users the stream will be shown the way it is. Similarly, you can also close other's stream being a host.

However, if you are a participant(role=50) you can only see the userbar on your stream and can pause/play only your stream.

Yes,You can user Peer2Peer and  Rtmfp with four users in a room if you are using the player 10 swc, the algorithm automatically adjusts between p2p and connection through server depending on the number of streams and the version of flash player installed along with rtmfp/rtmps connection. See the Peer2PeerRtmfp example for more details.

Hope this helps.

Thanks

Hironmay Basu