Looking for class of Wordpress audio player volume level
You need the correct selector, and background
instead of color
:
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{
background: #cc3333;
}
Wordpress audio using wp_audio_shortcode
How can I turn off/disable the mejs-mediaelement player that is added by the wp_audio_shortcode?
If you want to completely disable it, then use the wp_audio_shortcode_library
hook to prevent the media / player library's CSS and JS files from being queued/loaded:
add_filter( 'wp_audio_shortcode_library', '__return_empty_string' );
Alternatively, don't disable the library, but disable or replace only the default CSS class name: (the default media library JS/script for the [audio]
Shortcode is targeting only HTML elements with the wp-audio-shortcode
class)
add_filter( 'wp_audio_shortcode_class', '__return_empty_string' );
WP Audio Shortcode and AJAX
this is certainly because:
- Outputing the
wp_audio_player()
from ajax will only give the HTML markup - I believe
wp_audio_player()
to also add scripts (css maybe) to the page when called normally, without ajax.
What you could try:
Try to put another hidden
wp_audio_player()
in your PHP template to load the required scripts. It could work directly, or you could need to analyse the script to trigger what's needed.you may also be able to queue it as seen here
wp_enqueue_script( 'wp-mediaelement' );
As seen here it's possible to prevent Wordpress to load those scripts (some of them at least)
Audio Player:
- Why do you need the Wordpress one, and cannot use a typical HTML5 audio player ?
Related Topics
Jquery-Ui Datepicker CSS Problem
Start Div Scrollbar from Bottom with Pure CSS
CSS Background Image Centered with Stellar Js
Jw Player: Cross-Browser "Display:None" Player Behavior
Cutting a Triangle Out of Div, But Have It Horizontally Centered
CSS Display Property When a Float Is Applied
Shape-Outside of an Image Centered Between Two Text Blocks
Percentage Height in Nested Flex Box
Does a Cache Buster on an Image Url in CSS Cause an Extra Request
Media Query for iPad (Landscape) Applied to Samsung Galaxy Tab 2 (Landscape) as Well
Fluid Navigation Items of Different Widths with Equidistant Spacing
IE8 Renders Font Weights Randomly
How to Use Both Rel="Preload" and Rel="Stylesheet" for the Same Tag