-
AuthorPosts
-
November 1, 2022 at 12:27 pm #1370888
Hi Guys,
how can I change the color of the play button in the video element from white into #e3000f.
Thanks for the help.
Cheers
TNovember 2, 2022 at 3:19 am #1370999Hey cktanju,
Thank you for the inquiry.
Are you using mp4 or a locally hosted video? If yes, then you will have to replace the default mejs-controls.svg file in order to adjust the appearance of the player controls. The svg file is located in the wp-includes > js > mediaelement folder.
Best regards,
IsmaelNovember 2, 2022 at 6:06 pm #1371123Hi Ismael,
my Hoster will not allow that I do changes in wp core. Do we have other option?
And yes, I’m hosting the video on the own server.Cheers
TanjuNovember 3, 2022 at 2:07 am #1371161Hi,
Thank you for the update.
You can upload a custom svg file to the uploads folder or use the Media > Library to upload a media file, then use the following css code to adjust the style of the video controls.
.mejs-button>button { background: transparent url(mejs-controls.svg); border: 0; cursor: pointer; display: block; font-size: 0; height: 20px; line-height: 0; margin: 10px 6px; overflow: hidden; padding: 0; position: absolute; text-decoration: none; width: 20px; }
Replace the value of the background property with the custom svg file.
Best regards,
IsmaelNovember 3, 2022 at 3:22 pm #1371245Hi Ismael,
Sorry to say – it’s not working proper.
With the svg its not changing the play button – but all other control elements going crazy in just vertical lines – nothing here
then with a png no chang in the play button – and the control elements getting just a triangle…November 6, 2022 at 10:49 pm #1371581Hi,
Thanks for the link to your page, try using this css in your Quick CSS:.mejs-overlay-button:after { content: url(https://img.icons8.com/color/80/null/play-button-circled--v1.png); } .mejs-overlay-button { background: unset; }
After applying the css, please clear your browser cache and check.
you can choose a different play button from this site, they are free to use and some you can choose custom colors.
To get the link for the css, click Download ▸ CDN and copy the link, or you can download and upload to your site and then use the url to the image on your site.
Best regards,
MikeNovember 7, 2022 at 10:09 am #1371622Hi Mike,
this worked out. Thank you. Please close the topic.
Cheers
TanjuNovember 7, 2022 at 1:00 pm #1371648Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Video Element Color Play button’ is closed to new replies.