Skip to content

Commit

Permalink
修复压缩后lamejs变量丢失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangyuecn committed Aug 19, 2019
1 parent 3f957fc commit bc87727
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/engine/mp3.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion recorder.mp3.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/engine/mp3.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ Recorder.prototype.mp3_start=function(set){//如果返回null代表不支持
break;
};
};
var jsCode=";lamejs();var encObj=new lamejs.Mp3Encoder(1,"+set.sampleRate+","+set.bitRate+"),encArr=[];self.onmessage="+onmsg;
var jsCode=");lameFn();var encObj=new lameFn.Mp3Encoder(1,"+set.sampleRate+","+set.bitRate+"),encArr=[];self.onmessage="+onmsg;

var worker=new Worker((window.URL||webkitURL).createObjectURL(new Blob([Recorder.lamejs.toString()+jsCode], {type:"text/javascript"})));
var worker=new Worker((window.URL||webkitURL).createObjectURL(new Blob(["var lameFn=("+Recorder.lamejs.toString()+jsCode], {type:"text/javascript"})));
worker.onmessage=function(e){
ctx.call&&ctx.call(e.data);
ctx.call=null;
Expand Down

0 comments on commit bc87727

Please sign in to comment.