I’m using the Mediaelements.js Wordpress plugin on my website. The default settings (Chrome and Firefox, but not IE9) show the control bar on the player when the page loads. After clicking start, the control bar only becomes visible on mouseover. As far as I can tell the following snippet is what controls this function. Can someone tell me how to edit it so that the control bar is hidden at all times unless a user hovers over the player?
Thanks for the suggestion but that didn’t work. I want the controls to be hidden when the page loads and to become visible when hovering over the video. I think the javascript will need to be modified rather than just adding some extra css rules.
I don’t think that’s anything to do with the Mediaelements.js Wordpress plugin, rather the browser’s native behaviour.
Maybe you could do something like this:
var video = document.getElementById("wp_mep_1");
$(video).on({
mouseenter: function () {
video.setAttribute("controls","controls")
},
mouseleave: function () {
video.removeAttribute("controls");
}
});