Commit 01f5a1a4 authored by liujiaxin's avatar liujiaxin

feat: add audio record

parent b7cf2836
...@@ -156,6 +156,9 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy { ...@@ -156,6 +156,9 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
onTimeUpdate(event) { onTimeUpdate(event) {
this.percent = Math.floor((this.audio.currentTime / this.audio.duration) * 100); this.percent = Math.floor((this.audio.currentTime / this.audio.duration) * 100);
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
onBtnPlay() { onBtnPlay() {
...@@ -168,6 +171,9 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy { ...@@ -168,6 +171,9 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
} else { } else {
this.audio.play(); this.audio.play();
} }
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
// 开始录音 // 开始录音
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment