Yes you can do it! The trick is to "hide" the video controls without adding the "controls" attribute to your video tag. Then you can dynamically add it a few seconds after the video starts playing by adding the "controls" property to the tag using Javascript. Just set the value to "controls" and it will dynamically display in the DOM ... as if you had added controls to your HTML video tag. Adjust the timer if necessary.
<video id="some-video-id" src="some-video-url" poster="some-thumbnail-url" /> <a href="javascript:void(0);" id="startVideoLink">Start the Video</a> <script type="text/javascript"> var oVideoTag = document.getElementById('some-video-id'); var oLink = document.getElementById('startVideoLink'); if (oLink && oVideoTag) { oLink.addEventListener('click',function(e) { oVideoTag.play(); setTimeout(function() { oVideoTag.controls = 'controls'; },2500); },false); } </script>
Brian Kueck Nov 09 2018-12-12T00: 00Z
source share