     }
 
     public function onClosed(event:Event):void {
-      if ("playing" === this.currentState) {
-        this.currentState = "stopped";
+      if ('playing' === this.currentState) {
+        this.currentState = 'stopped';
         this.callAPI(EVENT_AUDIO_TRANSMIT_STOPPED);
       }
     }

        return;
      }

      if ("stopped" === this.currentState) {
        this.currentState = "playing";
        this.callAPI(EVENT_AUDIO_TRANSMIT_STARTED);
      }


        mic.removeEventListener(StatusEvent.STATUS, onMicStatus);
        mic.removeEventListener(SampleDataEvent.SAMPLE_DATA, onMicSampleData);
      }
      this.currentState = 'stopped';
      this.callAPI(EVENT_AUDIO_TRANSMIT_STOPPED);
      conn.close();
    }

