       error   : (err) -> console.error err
 
 
+  forEachSubscriber: (callback) ->
+    Object.keys(@subscribers).forEach (key) => callback @subscribers[key]
+
+
   ###*
    * Handler for session connected.
    * Binds the session, session events and updates the state.


    volume = if state then 100 else 0

    Object.keys(@subscribers).forEach (key) =>
      subscriber = @subscribers[key].videoData
      subscriber.setAudioVolume volume

    @setState { speaker: state }
    @emit 'SpeakerStateChanged', state


    @setState { publishing: off }
    @setEnded()



  ###*
