I'm fairly new to LCCS, and I'm not sure how the AudioPublisher and WebCamPublisher classes work with respect to Camera and Microphone intrinsic classes. I'm building a "green room" or auditioning component in Flex, and I'd like to enable the user to choose a webcam and microphone based on data from the names array in Camera/Microphone, but I can't seem to get output visualized from the devices unless AudioPublisher and WebCamPublisher are actively publishing. Is this designed behavior? I don't want users to have to transmit during testing of input devices. Many thanks in advance for suggestions!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi there,
Just making sure I understand correctly - you're trying to get the output
from the Microphone, before publishing, like, say a sound bar? ConnectNow
(which uses the LCCS components) has this feature, so it should be able to
work....
Are you calling Microphone.setLoopBack(true) in order to capture local
sound? Here's what I see in ConnectNow (some comments original, some mine) :
// _mm is the MicrophoneManager, and _comboBox has Microphone.names in it..
_mm.micIndex = _comboBox.selectedIndex;
// damned if I know why you need to check this
if(!_mm.inUse)
{
_mm.selectedMic.setLoopBack(true); //Loop back so we can see activity
}
_mm.selectedMic.soundTransform = new SoundTransform(0); //Silence it!
// then, in a timer loop, we have this :
private function updateActivity(p_evt:TimerEvent):void
{
// inputMeter is some kinda fancy progressbar
inputMeter.setProgress((mm.selectedMic) ?
_mm.selectedMic.activityLevel : 0, 100 );
}
Hope that helps,
nigel
Views
Replies
Total Likes
Hi there,
Just making sure I understand correctly - you're trying to get the output
from the Microphone, before publishing, like, say a sound bar? ConnectNow
(which uses the LCCS components) has this feature, so it should be able to
work....
Are you calling Microphone.setLoopBack(true) in order to capture local
sound? Here's what I see in ConnectNow (some comments original, some mine) :
// _mm is the MicrophoneManager, and _comboBox has Microphone.names in it..
_mm.micIndex = _comboBox.selectedIndex;
// damned if I know why you need to check this
if(!_mm.inUse)
{
_mm.selectedMic.setLoopBack(true); //Loop back so we can see activity
}
_mm.selectedMic.soundTransform = new SoundTransform(0); //Silence it!
// then, in a timer loop, we have this :
private function updateActivity(p_evt:TimerEvent):void
{
// inputMeter is some kinda fancy progressbar
inputMeter.setProgress((mm.selectedMic) ?
_mm.selectedMic.activityLevel : 0, 100 );
}
Hope that helps,
nigel
Views
Replies
Total Likes
Thanks, Nigel! That's exactly what I was looking for. Makes sense that the inUse property would let you know if the camera or microphone is already bound to something else. Thanks again!
-Robert
Views
Replies
Total Likes