I’m just starting to learn Hugo — I wonder if anyone could point me toward a theme or site that makes good use of a styled javascript audio player that is embedded in blog posts? something I can study to learn how this is done and what the best practices are.
I’m not looking for a specific JS script or player (I have one already I’m hoping to use). I just want to see how one goes about integrating a generic player script into Hugo and then using it in their posts. So ideally I’m trying to find a site where I can download the the source material as opposed to just look at a generated version of the site.
Basically, I think you need to create a shortcode to use according to the library you are planning to use. For example, the Plyr one simply needed a <source> tag and it worked. However, as the Wavesurfer library is not an audio player per se, it needed some extra markup and I specified the source as an attribute which I later passed on to the library using JavaScript.
That one was remarkably simple to install, thanks ! Can’t the say for many css players I tried, which, well, never worked.
I changed the shortcode into a partial to inject in my menu.
But the styling isn’t compatible with a short width, I’ll need something more rectangular and small. Touching the looks of <audio> html elements is so akward, because you don’t come up with your own buttons etc. Even modifying something existing, proves challenging for a newbie (2/3 newbie perhaps).