diff --git a/bricks/audio.js b/bricks/audio.js index 5e5a0e1..5f82419 100755 --- a/bricks/audio.js +++ b/bricks/audio.js @@ -76,7 +76,6 @@ bricks.AudioRecorder = class oops extends bricks.HBox { this.URL = window.URL||webkitURL; this.rec = null; this.wave = null; - this.status = null; this.mic_opened = false; this.add_widget(this.rec_btn); this.add_widget(this.rec_time); @@ -89,11 +88,9 @@ bricks.AudioRecorder = class oops extends bricks.HBox { if(this.rec_btn.url == this.start_icon){ this.rec_btn.set_url(this.stop_icon); this.start_recording(); - this.status = 'recording'; } else { this.rec_btn.set_url(this.start_icon); this.stop_recording(); - this.status = 'stoped'; } } on_process(buffers,powerLevel, @@ -103,8 +100,7 @@ bricks.AudioRecorder = class oops extends bricks.HBox { // document.querySelector(".recpowerx").style.width=powerLevel+"%"; //可视化图形绘制 // wave.input(buffers[buffers.length-1],powerLevel,bufferSampleRate); - if (this.status == 'recording') - this.rec_time.set_text(' ' + formatMs(bufferDuration,1)); + this.rec_time.set_text(' ' + formatMs(bufferDuration,1)); } recOpen(){ @@ -165,7 +161,7 @@ bricks.AudioRecorder = class oops extends bricks.HBox { bricks.debug("5JuL::未打开录音"); return; }; - this.pause_recording(); + // this.pause_recording(); this.rec.stop(function(blob,duration){ var localURL = this.URL.createObjectURL(blob); var d = { @@ -180,6 +176,7 @@ bricks.AudioRecorder = class oops extends bricks.HBox { }.bind(this),function(msg){ bricks.debug("kGZO::录音失败:"); }); + this.recClose(); } upload = async function(){ if(!this.recordData){ diff --git a/bricks/conform.js b/bricks/conform.js index dc6e74c..8cee484 100644 --- a/bricks/conform.js +++ b/bricks/conform.js @@ -28,12 +28,10 @@ bricks.Conform = class extends bricks.BMessage { this.message_w.add_widget(w); } conform_hndl(event){ - console.log(' --- conform event handling ...'); this.dismiss(); this.dispatch('conform'); } discard_hndl(event){ - console.log(' --- discard event handling ...'); this.dismiss(); } } diff --git a/bricks/floaticonbar.js b/bricks/floaticonbar.js index 946b33e..a1d9c42 100644 --- a/bricks/floaticonbar.js +++ b/bricks/floaticonbar.js @@ -56,7 +56,6 @@ bricks.IconBar = class extends bricks.HBox { return w; } regen_event(desc, event){ - console.log('regen_event desc=', desc); this.dispatch(desc.name, desc); this.dispatch('command', desc); event.stopPropagation();