How to hide controls under poster?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
31 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 | 31 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
35,647 users