/** stop all streams from being cast to the server */
  void doUnpublish() {
    for (String key : mLocalStream.keySet()) {
      final StreamDescription stream = mLocalStream.get(key);
      if (stream != null && stream.isLocal()) {
        stream.pc.removeStream(lMS);

        for (RoomObserver obs : mObservers) {
          obs.onStreamRemoved(stream);
        }

        if (mObservers.size() == 0) {
          destroy(stream);
        }
      }
    }
    mLocalStream.clear();

    if (lMS != null) {
      lMS.dispose();
    }
    if (mVideoCapturer != null) {
      mVideoCapturer.dispose();
    }

    lMS = null;
    mVideoCapturer = null;
    if (mVideoSource != null && !mVideoStopped) {
      mVideoSource.stop();
    }
    mVideoSource = null;
  }
 /** triggers the event that a stream was removed */
 void triggerStreamRemoved(StreamDescription stream) {
   for (RoomObserver obs : mObservers) {
     obs.onStreamRemoved(stream);
   }
   if (mObservers.size() == 0) {
     destroy(stream);
   }
 }