3 Replies Latest reply on Jul 29, 2010 2:42 AM by kkc_mca

    camera and microphone access notification

    kkc_mca Level 2

      Hi All,

       

      how can know what the user is selected ALLOW or DENY when the application try to access a Camera or Microphone?

       

      Is there any way to generate this notification at later point of time i.e., when the user interested to access mic?

       

      Thanks and regards,

      kkc

        • 1. Re: camera and microphone access notification
          VRPDeveloper Level 3

           

           

           

          There is no way in program to wheather user selected allow or deny

           


          If this post answers your question or helps, please kindly mark it as such.

          • 2. Re: camera and microphone access notification
            kkc_mca Level 2

            When this event will be raised.

             

            how to get the selected choice??

            • 3. Re: camera and microphone access notification
              kkc_mca Level 2

              To get the user choice we need add 
              StatusEvent.STATUS listener to the camera object
              The below example code code 
              
              camera.addEventListener(StatusEvent.STATUS, camera_status);
              private function camera_status(evt:StatusEvent):void {
                              var str:String = "[{0}] code:'{1}', level:'{2}'\\n";
                              textArea.text += StringUtil.substitute(str,
                                                  evt.type,
                                                  evt.code,
                                                  evt.level);
                              switch (evt.code) {
                                  case "Camera.Muted":
                                      Alert.show("User denied access to camera.");
                                      break;
                                  case "Camera.Unmuted":
                                      Alert.show("User allowed access to camera.");
                                      break;
                              }
                          }