In this example I’m developing a simple play/pause button using svg sprite technique.
const rt = Plyr.setup('.audio', { debug: true, controls: [ 'play' ], iconUrl: 'path/sprite.svg', iconPrefix: 'audio'
});
The sprite is an
<svg> <defs> <g id="audio-play"> <!-- svg content in here --> <g> <g id="audio-pause">
<!-- svg content in here --> <g> </defs> </svg>
This way the icons are DOM elements, where we’re still able to reference them.