 
 
   setupLocalVideo: ->
-    WebRTC.getUserMedia @options.media, ((stream)=> @handleLocalStream(stream)), (error)=>
-      @trigger 'user_media_error', error
-      WebRTC.log error
+    WebRTC.getUserMedia @options.media,
+      ((stream)=> @handleLocalStream(stream)),
+      (error)=>
+        @connect() if @options.connectWithoutMedia
+        @trigger 'user_media_error', error
+        WebRTC.log error
 
   handleLocalStream: (stream)->
     @stream ||= stream


    @client.trigger 'partner.created', @

  muteAudio: -> @stream?.getAudioTracks()[0].enabled = false

  muteVideo: -> @stream?.getVideoTracks()[0].enabled = false

  unmuteAudio: -> @stream?.getAudioTracks()[0].enabled = true

  unmuteVideo: -> @stream?.getVideoTracks()[0].enabled = true

  audioMuted: -> !@stream?.getAudioTracks()[0].enabled

  videoMuted: -> !@stream?.getVideoTracks()[0].enabled

  connect: ->
    @disconnect() if @connection

  pluginVersion: null

  defaultOptions:
    connectWithoutMedia: false
    media:
      audio: true
      video: true
