Commit 3cbefb9e authored by liujiaxin's avatar liujiaxin

feat: add audio record

parent 421d5468
...@@ -129,12 +129,19 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy { ...@@ -129,12 +129,19 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
console.log('play'); console.log('play');
this.playIcon = 'pause'; this.playIcon = 'pause';
this.isPlaying = true; this.isPlaying = true;
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
onPause() { onPause() {
console.log('pause'); console.log('pause');
this.playIcon = 'play'; this.playIcon = 'play';
this.isPlaying = false; this.isPlaying = false;
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
onEnded() { onEnded() {
...@@ -142,6 +149,9 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy { ...@@ -142,6 +149,9 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
this.playIcon = 'play'; this.playIcon = 'play';
this.percent = 0; this.percent = 0;
this.isPlaying = false; this.isPlaying = false;
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
onTimeUpdate(event) { onTimeUpdate(event) {
......
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