Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Problem in access audio

Avatar

Former Community Member

Hello there,

i add audio in code to can access mic however after finish and add private function also add handler event, test mic in platform but

Is dosent work i check mic in may computer is work fine i add the private function like it

private function onAudioClick(p_evt:MouseEvent):void
            {
                if ( p_evt.currentTarget.label == "Start My Audio" ) {
                    audioPub.publish();
                    p_evt.currentTarget.label = "Stop My Audio" ;
                }else if (p_evt.currentTarget.label == "Stop My Audio" ){
                    audioPub.stop();
                    p_evt.currentTarget.label = "Start My Audio" ;
                }
            }

and the handler event like it

<mx:Button x="577" y="455" id="btn" click="onAudioClick(event)" toggle="false" width="31" height="40" enabled="true" icon="@Embed(source='assets/Mic.png')"/>

and flash bulider work fine no have any wrong or alert message in code but mic is doent work

any ideas, thanks

2 Replies

Avatar

Level 3

your code looks ok to me. I do the same thing.

which mic is selected as default in your player?

Avatar

Former Community Member

Hello hinne thanks to to quick answer, i solve the problem it was im didn't add label  name in button of mic later i discover it and add label have name "Start my Audio" audio work fine.

thanks