This commit is contained in:
yumoqing 2025-09-29 17:20:14 +08:00
parent d7059bc2a2
commit 5ed94b018f

View File

@ -571,18 +571,18 @@ bricks.UiVideo =class extends bricks.UiFile {
} }
open_recorder(event){ open_recorder(event){
event.stopPropagation(); event.stopPropagation();
var camera = new bricks.Camera({ var recorder = new bricks.SysVideoRecorder({
"archor":"cc", "archor":"cc",
"auto_open":true, "auto_open":true,
"type": "recorder", "type": "recorder",
"height":"90%", "height":"90%",
"width":"90%" "width":"90%"
}); });
camera.bring_to_top(); recorder.bring_to_top();
camera.bind('recorded', this.accept_video.bind(this, camera)); recorder.bind('record_end', this.accept_video.bind(this, recorder));
} }
accept_video(camera, event){ accept_video(recorder, event){
camera.dismiss(); recorder.dismiss();
this.value = event.params this.value = event.params
console.log('record finished, value=', this.value); console.log('record finished, value=', this.value);
this.dispatch('changed', this.value); this.dispatch('changed', this.value);