I'm using videojs from https://vjs.zencdn.net/5.16.0/video.min.js to embed a video in my page. I have an action to be performed on click of the 'bigplaybutton'.
I tried to get the element by class name vjs-big-play-button(i haven't created a button explicitly...just using the one from videojs) and add an event listener to it.
document.getElementsByClassName("vjs-big-play-button").addEventListener('click', somefunction);
(or)
document.getElementsByClassName("vjs-big-play-button").onclick = function(){
console.log("play");
};
Neither of them work. I'm not sure if my approach is right. Kindly suggest a solution to achieve this.
