Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No buttons on control bar - mediaelement.js

I have uploaded all of the MediaElement files, in the original directories, but in the Demos the videos and audio play fine but the Play, Volume and Full screen buttons are not visible on the control bar.

Any ideas what's wrong?

Thanks

Matt

like image 845
Agent Fooey Avatar asked Dec 03 '22 00:12

Agent Fooey


2 Answers

I also ran into the same problem. Make sure you have added the correct MIME types for SVG images on your server. If they are not there, or if they are mis-configured, your browser will not display them.

I handled this through .htaccess:

AddType image/svg+xml svg
AddType image/svg+xml svgz

If you still can't get the SVG images to appear, you can always change the background images in the CSS to use the .png versions of the control bar and play icons.

like image 151
spncr Avatar answered Jan 09 '23 21:01

spncr


After reading the first answer from spncr, I found no-svg classes in the MEjs stylesheet that used the PNG files instead of SVG. I wrapped my audio element with a DIV using that class.

<div class="no-svg">
  <audio id="player1" controls>
    <source src="file.mp3" type="audio/mp3" >
    <p>This browser doesn't support audio.</p>
  </audio>
</div>
like image 40
PamM Avatar answered Jan 09 '23 22:01

PamM