• When I check my HTML Markup I can see this code.

    <video class="wp-video-shortcode" id="video-65-1" loop="1" autoplay="1" preload="metadata" controls="controls" width="10240" height="5760"><source type="video/mp4" src="Untitled9.mp4?_=1"><a href="Untitled9.mp4">Untitled9.mp4</a></video>

    But I am looking a solution for the video not show the controls when mouse overlay.

    One solution is to eliminate controls=”controls” from the code above but I have been trying to find this code inside the plugin.

    Does anyone knows how to disable the controls or eliminate this code?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Christina

    (@carasmo)

    This is done through CSS because the way it is added by default is through CSS. This can be found by inspecting with dev tools in your browser.

    .mejs-container .mejs-controls{
      display: none;
    }

    Add to your style.css file.

    Thread Starter Luis Supfort

    (@lupoll88)

    This does not works, now my question is how are you getting those CSS clases? You can check the HTML Markup and there is no CSS rules affecting or creating this control bar. So this is kind of non-sense without you getting me wrong of course…:)…do you have an screenshot where you can see the CSS Classes affecting this control bar on this plugin?

    Christina

    (@carasmo)

    It works fine. Your plugin CSS is enqueued after the theme style sheet, change the priority of your style.css file in your functions or use !important to over-ride the CSS that comes after it.

    I updated the Stackoverflow answer with the image and more details.

    • This reply was modified 8 years ago by Christina.
    Thread Starter Luis Supfort

    (@lupoll88)

    For those CSS classes to work that you offered in your solution, they have to be inside an HTML element and inside the “Featured Video Plus” HTML Markup. There is no such thing inside this plugin, so I don’t know how you came out with that solution, I do appreciate your help though but that does not apply to this.

    Thread Starter Luis Supfort

    (@lupoll88)

    ***** SOLUTION TO THIS PROBLEM *****

    NOTE: Unfortunately CSS does not works for this, so I ended up not changing the plugin, please if anyone has a better solution please share.

    This is not the best solution as I need to change the media.php file from WordPress but for me is a small price I am willing to pay.

    To eliminate controls inside the video tag go to /wp-includes/media.php

    And find this PHP code around line 2580 or so:

    $html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) );

    and just change it to this

    $html .= sprintf( '<video %s>', join( ' ', $attr_strings ) );

    Make a backup and every time you update WordPress, remember this small change as you will need to change it back

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable or Eliminate controls=”controls”’ is closed to new replies.