How to hide controls under poster?

0 like 0 dislike
17 views
Video Tag
How to hide controls under the poster ? Who knows ?
Or just an option instead of a poster of the cover to do ?
by | 17 views

2 Answers

0 like 0 dislike
First, put the video tag without the controls attribute
\r\r

by clicking on the video start the playback and settable controls = true
on pure js, without jQuery
document.addEventListener("DOMContentLoaded", function(){ // Ala $(document).ready let videos = document.getElementsByClassName('video'); // get all VIDOS with classism videos = [].slice.call(videos); // convert to an array videos.forEach(function(item) { // iterate through the array and hang handlers let media = item; media.onclick = function () { media.play(); // start the playback media.controls = true; // add controls }; media.addEventListener('ended', function() { media.controls = false; // video viewed, we remove the controls }); }); });


https://yandex.ru/search/?text=html5%20media%20api...
by
0 like 0 dislike
Code is still working))
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,909 users