This short handy plugin will add playback buttons to your audio and video elements added via the built-in wordpress shortcodes for media using mediaelement.js. Each set of buttons is configured for it’s corresponding element on the page, so you can adjust the speed of multiple files independantly.
There is currently no persistence implemented in this plugin. It just scratches an itch to be able to broadly adjust media playback speeds using the HTML api.
NOTE: This uses the HTML5 media Element API. Any browser not supporting these or using the Flash Player fallback will miss out on this functionality.
Two hooks are provided within this plugin.
media-playback-speed-generate-controlsprovides a single argument which is a boolean. If you return this as false, this will stop buttons being added to a media player. This is intended for advanced setups where markup for controls might be placed manually elsewhere on the page such as a sticky footer. 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).
‘media-playback-speed-data’ provides the default array containing arrays as items with
labelentries, which set the playback rate, the title and aria-title for the buttons as well as adjust the button text.
Please feel free to suggest improvements, report conflicts, and/or make suggestions for integration hooks etc.