{"action":"created","issue":{"url":"https://api.github.com/repos/streamproc/MediaStreamRecorder/issues/33","labels_url":"https://api.github.com/repos/streamproc/MediaStreamRecorder/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/streamproc/MediaStreamRecorder/issues/33/comments","events_url":"https://api.github.com/repos/streamproc/MediaStreamRecorder/issues/33/events","html_url":"https://github.com/streamproc/MediaStreamRecorder/issues/33","id":67813754,"number":33,"title":"Audio Recorder does not fire dataavailable event when stop button is pressed","user":{"login":"lionelroux","id":11902757,"avatar_url":"https://avatars.githubusercontent.com/u/11902757?v=3","gravatar_id":"","url":"https://api.github.com/users/lionelroux","html_url":"https://github.com/lionelroux","followers_url":"https://api.github.com/users/lionelroux/followers","following_url":"https://api.github.com/users/lionelroux/following{/other_user}","gists_url":"https://api.github.com/users/lionelroux/gists{/gist_id}","starred_url":"https://api.github.com/users/lionelroux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lionelroux/subscriptions","organizations_url":"https://api.github.com/users/lionelroux/orgs","repos_url":"https://api.github.com/users/lionelroux/repos","events_url":"https://api.github.com/users/lionelroux/events{/privacy}","received_events_url":"https://api.github.com/users/lionelroux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-11T17:52:00Z","updated_at":"2015-04-15T08:42:53Z","closed_at":null,"body":"Hello,\r\n\r\ni'm using FF Developer Edition version 38.\r\nOn the audio demo, when I click on the stop button, I have to wait for the time interval end to get the last blob. This prevent me for setting a bigger time slice (let's say 1 min).\r\n\r\nFrom the media recorder page on MDN, it is indicated :\r\n In each case, the stop event is preceded by a dataavailable event, making the Blob captured up to that point available for you to use in your application.\r\n\r\nIt does not seem to be the case with your wonderful library. Doyou think there is something to do to get the correct behaviour ?\r\n\r\nThx in advance\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/streamproc/MediaStreamRecorder/issues/comments/93263293","html_url":"https://github.com/streamproc/MediaStreamRecorder/issues/33#issuecomment-93263293","issue_url":"https://api.github.com/repos/streamproc/MediaStreamRecorder/issues/33","id":93263293,"user":{"login":"incik","id":303200,"avatar_url":"https://avatars.githubusercontent.com/u/303200?v=3","gravatar_id":"","url":"https://api.github.com/users/incik","html_url":"https://github.com/incik","followers_url":"https://api.github.com/users/incik/followers","following_url":"https://api.github.com/users/incik/following{/other_user}","gists_url":"https://api.github.com/users/incik/gists{/gist_id}","starred_url":"https://api.github.com/users/incik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incik/subscriptions","organizations_url":"https://api.github.com/users/incik/orgs","repos_url":"https://api.github.com/users/incik/repos","events_url":"https://api.github.com/users/incik/events{/privacy}","received_events_url":"https://api.github.com/users/incik/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T08:42:53Z","updated_at":"2015-04-15T08:42:53Z","body":"I have the same problem with video recording. I tried solution that you're describing, but there's problem with it.\r\n\r\nJust adding ``!isStopRecording`` condition to ``setTimeout`` doesn't have any effect. And adding ``mediaRecorder.stop()`` to ``this.stop()`` yields error\r\n`InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable`\r\n\r\nBut perhaps I'm doing it wrong. Could you show me the code?\r\n\r\nThe only way I successfully managed to fire ondataavailable before the original timeout was by turning off the stream it self with something like\r\n\r\n```\r\n$scope.stopRecording = function() {\r\n    $scope.mediaRecorder.stop();\r\n    $scope.mediaRecorder.stream.stop();\r\n  };\r\n```\r\n\r\nBut this is not acceptable solution, because I need to be able to start recording again immediately and by cutting of the stream I turn off webcam I cant get it on again :("}}