     @glance()
 
 
-  handleVideoActive: (publisher) ->
-
-    @videoActive = yes
+  handleVideoActive: -> @videoActive = yes
+  handleVideoEnded: -> @videoActive = no
 
 
   glance: ->


    @input.input.on 'focus', @lazyBound 'handleFocus', yes


    @once 'NewParticipantButtonClicked', => @onboarding?.destroy()



  settingsMenu: ->

    menu =
      'Search'     : { cssClass : 'disabled', callback: kd.noop }
      'Minimize'   : { callback : @getDelegate().bound 'end' }
      'Learn More' : { separator: yes, callback : -> kd.utils.createExternalLink 'http://learn.koding.com/collaboration' }
      # 'Settings' : { callback : @getDelegate().bound 'showSettingsPane' }

    # wtf? this somehow means that we are host. ~Umut
    unless @isInSession
      seperator = yes
      if @videoActive
      then menu['End Video Chat'] = { seperator, callback: @bound 'requestEndVideo' }
      else menu['Start Video Chat']  = { seperator, callback: @bound 'requestStartVideo' }

    if @isInSession
    then menu['Leave Session'] = { callback : => @parent.settingsPane.leaveSession() }
