+ 1

Chrome do not play html5 video on background website!

I need a Java script code for play one video on background slider site. I using revolution slider for my site. thanks for reading and help me.

12th Jun 2018, 1:03 AM
M. R. Saberi
3 Respostas
+ 1
after a long time, with last slider revolution update, background video showing correctly ;-)
28th Jul 2018, 7:44 PM
M. R. Saberi
+ 3
<div class="video-slider"> <!-- SLIDE 1 --> <div class="slide"> <video class="slider-video" poster=""> <source src="" type="" /> </video> <div class="overlay-content"> <div class="play-button"></div> </div> </div> <!-- SLIDE 2 --> <div class="slide"> <video class="slider-video" poster=""> <source src="" type="" /> </video> <div class="overlay-content"> <div class="play-button"></div> </div> </div> <!-- END OF SLIDES --> <div class="slide-arrow left"></div> <div class="slide-arrow right"></div> </div> And here is a way of doing what you want to do (according to the new HTML structure): $('.play-button').on('click', function () { $(this).hide(); $(this).parent().fadeOut(); $(this).parent().siblings('.slider-video')[0].play(); }); $('.slider-video').on('play', function () { $(this).attr('controls', '1'); });
12th Jun 2018, 4:27 AM
Alexander Sokolov
Alexander Sokolov - avatar
0
Thanks for answering, I use revolution slider plugin and I put a video on the background without play/pause key, in google chrome video background is not play and other browsers is OK, please help me for solve this problem.
12th Jun 2018, 10:41 PM
M. R. Saberi