https://javascript.plainenglish.io/how-to-detect-if-an-html5-video-element-is-playing-with-javascript-bd3ec89722de