@ViewChild('audio', { static: true }) private audio: ElementRef;private audioEl: HTMLAudioElement;
onCanplay(){ this.play();
}
play(){this.audioEl.play();}
报错Cannot read property 'play' of undefined。
https://blog.csdn.net/zzwwjjdj1/article/details/52125717