         @emit "save"
 
   attachEvents: ->
+
+    {snapTitle} = @getOptions()
+
+    @on "KDObjectWillBeDestroyed", => @unsetVideoStream()
+
     @on "viewAppended", =>
       @context = @picture.getElement().getContext "2d"
       @getUserMedia()

      @retake.show()
      @save.show()
      @takePicture()
      @button.setTitle options.snapTitle

  resetView: ->
    @button.show()


    if navigator.getUserMedia
      navigator.getUserMedia video: yes, (stream)=>
        @localMediaStream = stream
        @setVideoStream (window.URL and window.URL.createObjectURL stream) or stream
      , _onError
    else _onError notSupported: yes
