How to make the appearance of the modal window after watching the video?

I need after watching the video opened modal window. But only if the user watched the video until the end.

Thanks in advance.
June 14th 19 at 20:19
1 answer
June 14th 19 at 20:21
An example in the sandbox
document.getElementById('player').addEventListener('ended', function() {
 alert('The end!');
}, false);

Find more questions by tags CSSHTMLJavaScriptLayoutWeb Development