Skip to main content
Known Participant
Mar 29, 2010 11:35 AM UTC
Question

Mute/unmute issue

I want to perform mute /unmute For that i am using following code

               public function audioMuteUnMute(state:String):void{
                           
                if (state=="Mute"){
                    ns.attachAudio(null);
                    ns.receiveAudio(false);
                   
                }
                else  
                {
                   
                    ns.attachAudio(microphone);
                    ns.receiveAudio(true);
                   
                }
            }


Give errror at ns = new NetStream(nc);

firstly i mute then press for unmute then it gives folloeing error.

Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Seek.Failed
    at com.controller::BroadcastPod/connectStream()
    at com.controller::BroadcastPod/init()
    at com.controller::BroadcastPod/___BroadcastPod_Canvas1_creationComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.core::UIComponent/set initialized()
    at mx.managers::LayoutManager/doPhasedInstantiation()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()
    at mx.core::UIComponent/callLaterDispatcher()

    This topic is closed to new replies. Start a new post to keep the conversation going.

    10 replies

    Mar 29, 2010 12:30 PM UTC

    HI,

    Does your stream get muted when you press mute? Also can you provide the details where you are changing the state variable from "Mute" to "Unmute". Also there is no need to set attachAudio to null.

    And you can also check return values of recieveAudio function as to it returns true or false

    Thanks,

    Abhishek

    Translate
    Known Participant
    Mar 29, 2010 12:45 PM UTC

    yes stream is get muted but when i again press on same button for unmute

    te it give error , state variable set on mute/unmute button press .it is a toggle button

    Translate
    Mar 29, 2010 1:24 PM UTC

    Hi,

    If possible can you post your entire client side code, so that I can nail down the issue you are facing. If you are not comfortable posting here, you can send it as a private message to me.

    Thanks,

    Abhishek

    Translate
    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    Mar 29, 2010 12:27 PM UTC

    Hi,

    Why do you want to call "ns.attachAudio()" method. Just calling ns.receiveAudio(); with true and false does not work?

    Regards,

    Janaki L

    Translate