I usually use it to show an image after a video plays but you can do other things like play other videos or assign class names.
headerVideo = document.querySelector('#headerVideo');
imgHeader = document.querySelector('#imgHeader');
headerVideo.onended = function (e) {
headerVideo.style.opacity = "0";
imgHeader.style.opacity = "1";
};
Have any questions or comments? Write them below!