       @emitChange()
 
 
+  ###*
+   * Difference between this and super method, is that this one emits the state
+   * with lists as well. This may be better to be moved to super class.
+  ###
   emitChange: -> @emit 'change', @getLists(), @state
 
 
+  ###*
+   * Sets video state to given state.
+   *
+   *     - if resulting state is `active` it will use second parameter as
+   *       initial participant list.
+   *
+   * @param {boolean} state
+   * @param {array.<string>} participants
+  ###
   setVideoState: (state, participants) ->
 
     @state.videoActive = state

      @emitChange()


  removeVideoActiveParticipant: (nickname) ->

    index = @state.videoParticipants.indexOf nickname

      @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
