I'm using the Themepunch Revolution slider in a project, which shows a single video slide in HTML 5.
When I click on it, it pauses, which I don't want.
The <video>
element in the page is generated by the slider plugin.
Here's what I tried so far:
$('body').on('click', 'video', function(e) {
e.preventDefault();
e.stopPropagation();
return false;
});
This is the code in the slider library:
html5vid.find('video, .tp-poster, .tp-video-play-button').click(function() {
if (html5vid.hasClass("videoisplaying"))
video.pause();
else
video.play();
})
I also tried catching the pause event, but it never fires:
$('body').on('pause', 'video', ...);
I'm using the Themepunch Revolution slider in a project, which shows a single video slide in HTML 5.
When I click on it, it pauses, which I don't want.
The <video>
element in the page is generated by the slider plugin.
Here's what I tried so far:
$('body').on('click', 'video', function(e) {
e.preventDefault();
e.stopPropagation();
return false;
});
This is the code in the slider library:
html5vid.find('video, .tp-poster, .tp-video-play-button').click(function() {
if (html5vid.hasClass("videoisplaying"))
video.pause();
else
video.play();
})
I also tried catching the pause event, but it never fires:
$('body').on('pause', 'video', ...);
Share
Improve this question
asked Feb 27, 2016 at 13:44
OliOli
2,4742 gold badges28 silver badges47 bronze badges
3
- well, isn't the code in the slider library telling you why it's pausing? it's checking whether it's running, if so it will pause... don't think you can override that outside the library unless you edited the script... – benomatis Commented Feb 27, 2016 at 13:46
-
...have you tried unbinding
click
? – benomatis Commented Feb 27, 2016 at 13:49 - @webeno yeah my only working solution so far is directly removing the lines from the library, which is ugly :( – Oli Commented Feb 27, 2016 at 14:00
3 Answers
Reset to default 5For Revolution Slider 6.x
, it's easier, just select the video layer option > Content > (Scroll down) Advanced Media Settings > Set "No Interaction" off
This will disable the click to pause/play also remove controls, you end up with a playing video with no interactions, also don't forget to set Loop Media
on for plete experience
Revolution Slider No Interaction Setting to prevent controls and stop click for play/pause:
Hey it is 2019 but anyone who look for solution is that :
Put transparent shape layer onto video layer as full width and height.
Make sure put this layer one step above the video layer as showing below(this shape looks like it below the video layer but in rev slider animation settings the more bottom the more up on the front-end i hope i make it clear :)
Layer positions on rev slider animation settings
Try
html5vid.find('video, .tp-poster, .tp-video-play-button').unbind('click');
Replace html5vid
with whatever element the script is looking to find in.
EDITED
...or better yet, try to unbind click
on the video
element as follows:
$('video').unbind( "click" );
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745346716a4623585.html
评论列表(0条)