Skip to content
Snippets Groups Projects
Commit 3a82beb8 authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Fix audio-recorder not stoping. Closes #1941.

parent 3f50123a
No related branches found
No related tags found
No related merge requests found
......@@ -116,7 +116,6 @@ Template.messageBox.events
fileUpload filesToUpload
'click .message-form .mic': (e, t) ->
console.log window.AudioRecorder
AudioRecorder.start ->
t.$('.stop-mic').removeClass('hidden')
t.$('.mic').addClass('hidden')
......
@AudioRecorder = new class
@AudioRecorder = new class
start: (cb) ->
window.AudioContext = window.AudioContext or window.webkitAudioContext
navigator.getUserMedia = navigator.getUserMedia or navigator.webkitGetUserMedia
......@@ -28,7 +28,7 @@
if cb?
@getBlob cb
@stream.stop()
@stream.getAudioTracks()[0].stop()
@recorder.clear()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment