 VideoCollaborationModel = require 'app/videocollaboration/model'
 socialHelpers           = require './collaboration/helpers/social'
+isVideoFeatureEnabled   = require 'app/util/isVideoFeatureEnabled'
 
 generatePayloadFromModel = (model) ->
   return {

        @handleVideoParticipantTalkingStateChanged participant, on
      .on 'ParticipantStoppedTalking', (participant) =>
        @handleVideoParticipantTalkingStateChanged participant, off


    participantEvents = [
      'SelectedParticipantChanged'

  hasParticipantWithAudio: (nickname, callback) ->

    @videoModel.hasParticipantWithAudio nickname, callback


  handleVideoSessionConnected: (session, videoActive) ->

    if isVideoFeatureEnabled()
      if videoActive
        @emitToViews 'VideoSessionConnected', { action: 'join' }
      else
        if @amIHost
          @emitToViews 'VideoSessionConnected', { action: 'start' }


  handleVideoAccessQuestionAsked: ->
