This commit is contained in:
yumoqing 2025-09-29 18:01:22 +08:00
parent 90134e631c
commit f2071dec5a

View File

@ -19,7 +19,7 @@ bricks.MediaRecorder = class extends bricks.Popup {
this.timepass = new bricks.Text({text:'', cheight: 10}); this.timepass = new bricks.Text({text:'', cheight: 10});
var filler = new bricks.Filler({}); var filler = new bricks.Filler({});
var cancel = new bricks.Svg({ var cancel = new bricks.Svg({
url: '/imgs/delete.svg', url: bricks_resource('imgs/delete.svg'),
rate:2, rate:2,
tip: 'cancel recording'}); tip: 'cancel recording'});
cancel.bind('click', this.cancel_record.bind(this)) cancel.bind('click', this.cancel_record.bind(this))
@ -94,6 +94,7 @@ bricks.MediaRecorder = class extends bricks.Popup {
this.stream.getTracks().forEach(track => track.stop()); this.stream.getTracks().forEach(track => track.stop());
this.stream = null; this.stream = null;
} }
this.dismiss();
} }
} }
@ -157,6 +158,7 @@ bricks.SysVideoRecorder = class extends bricks.MediaRecorder {
} }
bricks.SysCamera= class extends bricks.SysVideoRecorder { bricks.SysCamera= class extends bricks.SysVideoRecorder {
switch_record(){ switch_record(){
console.log('shot it ............');
event.stopPropagation(); event.stopPropagation();
if (this.task){ if (this.task){
task.cancel(); task.cancel();
@ -165,6 +167,7 @@ bricks.SysCamera= class extends bricks.SysVideoRecorder {
this.task_period = 0; this.task_period = 0;
this.task = null; this.task = null;
this.dispatch('shot', this.dataurl); this.dispatch('shot', this.dataurl);
this.dismiss();
} }
} }
bricks.Factory.register('SysCamera', bricks.SysCamera); bricks.Factory.register('SysCamera', bricks.SysCamera);