       @emitChange()  if emitEvent
 
 
+  ###*
+   * Defensively removes a video participant. Emits change afterwards if wanted.
+   *
+   * @param {string} nickname
+   * @param {boolean=} emitEvent
+  ###
   removeVideoParticipant: (nickname, emitEvent = yes) ->
 
     index = @state.videoParticipants.indexOf nickname

      @emitChange()


  removeTalkingParticipant: (nickname) ->

    index = @state.talkingParticipants.indexOf nickname

      @emitChange()  if emitEvent


  ###*
   * Sets given username as selected participant. It's a noop if user is not
   * online. Emits change afterwards.
   *
   * @param {string} nickname
   * @param {boolean} isOnline
  ###
  setVideoSelectedParticipant: (nickname, isOnline) ->

    return  unless isOnline
