       if (this.ns.bufferTime === 0 && 'NetStream.Play.Start' === event.info.code) {
         // Buffer is set to 0, dispatch start event immediately
         dispatchEvent(new ClientEvent(ClientEvent.START_PLAY));
+        this.currentState = "playing";
         return;
       }
 
       if (this.ns.bufferTime === 0 && 'NetStream.Unpause.Notify' === event.info.code) {
         // Buffer is set to 0, dispatch start event immediately
         dispatchEvent(new ClientEvent(ClientEvent.START_PLAY));
+        this.currentState = "playing";
         return;
       }
 
       if ('NetStream.Buffer.Full' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.START_PLAY));
+        this.currentState = "playing";
         return;
       }
 
       if ('NetStream.Buffer.Empty' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.PAUSED, { 'reason': 'buffering' }));
+        this.currentState = "paused";
         return;
       }
 
       if ('NetStream.Pause.Notify' === event.info.code) {
         dispatchEvent(new ClientEvent(ClientEvent.PAUSED, { 'reason': 'user' }));
+        this.currentState = "paused";
         return;
       }
     }

    private var ns:NetStream;
    private var streamServer:String;
    private var streamId:String;

    public function RTMPClient(video:Video, urlParsed:Object) {
      this.video = video;

    public function stop():Boolean {
      ns.dispose();
      nc.close();
      this.currentState = "stopped";
      return true;
    }

    public function pause():Boolean {
      if (this.currentState !== 'playing') {
        ErrorManager.dispatchError(800);
        return false;
      }
      ns.pause();
      this.currentState = "paused";
      return true;
    }

    public function resume():Boolean {
      if (this.currentState !== 'paused') {
        ErrorManager.dispatchError(801);
        return false;
      }
      ns.resume();
      return true;
    }
