+ 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.
3 Antworten
+ 1
after a long time, with last slider revolution update, background video showing correctly ;-)
+ 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'); });
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.