pls, können Sie mir helfen? Ich habe diesen Code, für Wordpress html5 Video auf Hover spielen ... aber ich brauche, keine Pause, wenn Mouseout, sondern img Poster wie auf aktualisieren.MouseOver - Zeigen Sie Plakat/HTML5 Video, WordPress
Irgendwelche Ideen?
Tyfunctions.php
function custom_video_preview(){
?>
<script>
var figure = jQuery(".video").hover(hoverVideo, hideVideo);
function hoverVideo(e) {
jQuery('video', this).get(0).play();
}
function hideVideo(e) {
jQuery('video', this).get(0).pause();
}
</script>
<?php
}
add_action('wp_footer', 'custom_video_preview');
und mein HTML-Code in der Post
<div id="videosList">
<div class="video">
<video class="thevideo" loop preload="none" poster="https://t12.pixhost.org/thumbs/383/50595935_s970x545.jpg">
<source src="https://my.mixtape.moe/qvmktx.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</div>
Danke
Danke, aber es funktioniert nicht:/ Hier Testversion/Ergebnis - http://68108.w8.wedos.ws/domains/giftbox.sk/2014/11/23/are-will -took-form-the-nor-true/ –
Es spielt weiter, wenn die Maus austritt, also scheint es zu funktionieren? Scheint nur ein wenig hinken. Hit ctrl + f5, dies wird eine harte Aktualisierung durchführen, um das Javascript für Sie zu aktualisieren. – Chad