Problems with AVCastManager
Posted: 04 Jan 2011, 22:10
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:
2) Attaching subscriptions to an object in my flash application for each user in the chat as follows:
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
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