• I am trying to get a video set up on my blog that will play when you hover the cursor over it, inside of a caption. I had assumed that the ‘hover’ part would be the really tough part, but that turns out to be dead simple, using the advice from here:

    https://wordpress.org/support/topic/play-video-on-hover?replies=14

    Specifically:

    <video id="cory" title="This is hovertext!" src="/wp-content/uploads/2015/11/cory.mp4" poster="/wp-content/uploads/2015/11/cory-600x337.jpg" loop width="600" height="337" onMouseOver="cory.play()" onMouseOut="cory.pause()" onclick="window.location='/wp-content/uploads/2015/11/cory.mp4'; cory.pause()"></video>

    However, I really really don’t understand how all the square-bracket stuff works in wordpress. I’d love to be able to throw a [caption][/caption] pair around this and have it work, but alas, it doesn’t. I know basic HTML, but have resisted learning CSS up until now. Can anyone help me out a bit? I have to assume [caption]s weren’t really intended to wrap random acts of <video/> but maybe there’s a way to wrap it in something else? Or access the caption style directly?

  • The topic ‘Embedded video: play on hover, but with captions’ is closed to new replies.