something like this:
private function micChanged(event:Event):void
{
audioPub.stop();
audioPub.microphoneManager.micIndex = micSelection.selectedIndex;
audioPub.publish();
}
but this don't works...
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You might have to wait for the stream to have been deleted i.e. listen to StreamEvent.STREAM_DELETE event in audio publisher and after that set the microphone manager and then publish.
Are you using multiple microphones/cameras ?
Thanks
Hironmay Basu
Views
Replies
Total Likes
Hi,
You might have to wait for the stream to have been deleted i.e. listen to StreamEvent.STREAM_DELETE event in audio publisher and after that set the microphone manager and then publish.
Are you using multiple microphones/cameras ?
Thanks
Hironmay Basu
Views
Replies
Total Likes
Many thanks...
Yes, I'm using multiple microphones/cameras.
Now this is the right code (for me)
private function micChanged(event:Event):void
{
audioPub.stop();
audioPub.addEventListener(StreamEvent.STREAM_DELETE, onMicChanged);
}
private function onMicChanged(se:StreamEvent):void{
audioPub.microphoneManager.micIndex = micSelection.selectedIndex;
audioPub.publish();
audioPub.removeEventListener(StreamEvent.STREAM_DELETE, onMicChanged);
}
Views
Replies
Total Likes
I would to solve the same issue with the camera, but I don't know about some kind of "webcamera manager".
This is my code... (don't works), thanks in advance.
<rtc:WebCamera id="videoContainer" height="250" width="640" aspectRatio="{StreamManager.AR_PORTRAIT}"/>
...
...
private function cameraChanged(event:Event):void
{
videoContainer.publisher.stop();
videoContainer.publisher.addEventListener(StreamEvent.STREAM_DELETE, onCameraChanged);
}
videoContainer.publisher.cameraNameIndex = cameraSelection.selectedIndex.toString(); //maybe here is wrong.
videoContainer.publisher.publish();
videoContainer.publisher.quality = camQualitySlider.value;
videoContainer.publisher.removeEventListener(StreamEvent.STREAM_DELETE, onCameraChanged);
}
Views
Replies
Total Likes
Views
Likes
Replies