Permalink
Browse files

waits to create blob until chunks have been set, to accomodate for Fi…

…refox MediaRecorder API. #23
  • Loading branch information...
common-nighthawk committed Dec 9, 2016
1 parent 3a6ca42 commit f1bb3fe30d91a4389ff9793782494795d97dd0ab
Showing with 8 additions and 0 deletions.
  1. +8 −0 templates/scripts.go
View
@@ -70,6 +70,14 @@ func MsgScript() string {
stop.onclick = e => {
recorder.stop();
stop.style.display='none'; rec.style.display='none'; send.style.display='initial'; dismiss.style.display='initial';
setBlob();
}
function setBlob() {
if (chunks.length < 1) {
setTimeout(setBlob, 25);
return;
}
blob = new Blob(chunks, {type: media.type });
var url = window.URL.createObjectURL(blob);

0 comments on commit f1bb3fe

Please sign in to comment.