Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Auditioning camera and microphone in LCCS app?

Avatar

Level 2

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!

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Level 2

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