so I've built a custom html controls for the <video> element and hooked it up to JavaScript to make the video functionality work, it all working just fine.
The issue is when I call requestFullscreen(), The default browser controls show on fullscreen preview, the easy fix was to remove it from css like so:
Css
video::-webkit-media-controls {
display: none !important;
}
And now the video is in fullscreen without the controls, now I can't control the video and the HTML controls aren't being shown in fullscreen, I tried fixing it by adding z-index:100 but that didn't work.
I saw this post from 8 years ago: change html5 video controls layout when fullscreen
But this answer also didn't work for me, and I think there should be a better way to do it right?
It doesn't even work in css-tricks tutorial demo here: custom controls in html5 video full screen
My Question is:
How can I allow the HTML5 controls element (found in HTML) to show in fullscreen mode.
HTML
<div class="vd-wrapper">
<div class="video">
<video width="640" height="360">
<source src="./assests/video-sample.mp4" type="video/mp4">
</video>
</div>
30| <div class="controls">
31| // Controls HTML5...
201| <svg id="full-screen-icon">
230| </div>
231| </div> <!-- vid-wrapper -->
JS
let fullScreen = document.getElementById("full-screen-icon");
fullScreen.addEventListener("click", toggleFullScreen);
function toggleFullScreen() {
video.requestFullscreen().catch(e => console.log(e));
}


