When a video begins to play, I want an ionic app I'm constructing to perform some action, like hide a button, etc. This is my code.
let video = <HTMLVideoElement> document.getElementById(i)
if(video.paused) {
video.play()
video.oncanplay=()=>console.log('Starts playing');
}
How can I call a function every time a video on that website begins playing if the code isn't working?