Now that Gutenberg does not add these, it makes sense to for-now add two sets of classes. Initially mejs-active class was added in order to create media-playback-js compatible / familiar class names. playback-rate-button.active-playback-rate CSS-selectors allow you to style the active speed (per-player). ‘media-playback-speed-data’ provides the default array containing arrays as items with rate, title and label entries, which set the playback rate, the title and aria-title for the buttons as well as adjust the button text. So long as controls follow the built-in markup (being within the body tag and have a playback-rate-button class (no default styling, used for enabling DOM access only). This is intended for advanced setups where markup for controls might be placed manually elsewhere on the page such as a sticky footer. If you return this as false, this will stop buttons being added to a media player. Media-playback-speed-generate-controls provides a single argument which is a boolean. Two hooks are provided within this plugin. Any browser not supporting these or using the Flash Player fallback will miss out on this functionality. NOTE: This uses the HTML5 media Element API. It just scratches an itch to be able to broadly adjust media playback speeds using the HTML api. There is currently no persistence implemented in this plugin. This short, handy plugin will add playback buttons to your audio, video & playlist elements added via the built-in WordPress shortcodes for media using mediaelement.js.Įach set of buttons is configured for it’s corresponding element on the page, so you can adjust the speed of multiple files independently.