i have a simple angular application to play audio using JavaScript web Audio Object below is
app.component.ts
export class AppComponent {
title = 'media player';
audio;
currentTime: number;
constructor() {
this.audio = new Audio();
this.audio.src = './Music/demo2.MP3';
this.audio.play();
this.currentTime = this.audio.currentTime;
}
}
and app.component.ts
<h4>{{ currentTime }}</h4>
everything works fine but the view isn't update as the model changes