Page 1 of 1

Problems with AVCastManager

Posted: 04 Jan 2011, 22:10
by ojaro
Hi all,

Appologies in advance if these questions are trivial, but I am not that familiar with flash/action script.

I have been trying to implement a voice chat room based on the examples available. Everything seems to be working fine, live casts are getting published and subscribed to, however I am not getting any sound through.

I have a feeling this might be because I am not attaching things correctly to my flash application.

What I am currently doing is:

1) Attaching the microphone on live cast publish as below:

Code: Select all

var mystream:NetStream = avCastMan.publishLiveCast(false, true);
mystream.attachAudio(Microphone.getMicrophone());


2) Attaching subscriptions to an object in my flash application for each user in the chat as follows:

Code: Select all

for each (var liveCast:LiveCast in avCastMan.getAvailableCasts())
   {
      var userstream:NetStream = avCastMan.subscribeLiveCast(liveCast.id);
      var soundContainer:Video = new Video();
      soundContainer.name = "user_" + liveCast.id;
      online.addChild(soundContainer);
      soundContainer.attachNetStream(userstream);
   }


Is that all I need to do or am I still missing out something else? Does the flash object I add the child to need to be some special type or does any object work?

Thanks for your help in advance,

Olli

Posted: 11 Jan 2011, 07:03
by Bax
First of all, make sure the Flash Player is using the right microphone. Right-click on the swf running in the browser, choose "Settings" select the microphone tab and make sure the right device is selected in the dropdown.

Issue resolved

Posted: 11 Jan 2011, 07:20
by ojaro
Thanks for the reply.

I did figure it out in the end. The problem was that my flash application width was less than the dialogue with for the microphone access, hence flash decided to just mute the microphone, nice!

Not sure if this is a known flash issue, but if not then it looks like the minimum width for voice enabled flash application is 214px :)

Regards,

Olli