How to replace file link with a name during Safari/Chrome audio playback on home screen? How to replace file link with a name during Safari/Chrome audio playback on home screen? google-chrome google-chrome

How to replace file link with a name during Safari/Chrome audio playback on home screen?


I think setting title attribute (on the audio element) to the string you want to be displayed, may be the solution you want.

PS: I'm inexperienced in SO so don't lay it all on me please, just trying to help.


In response to the bounty, I'm pretty sure there is NO credible or official source for the accepted answer.

Official documentation on <audio> tag consistently makes no reference to the title attribute MDN: <audio> as an example. And using title attribute on <audio> element will not result in any sort of magic behavior for typical users of the native api.

The author of audio.js also makes no mention of title in his documentation, nor any mention of it in his well-commented source code. Author of audio.js also does not use it in the official examples of module usage.

Two examples are provided by audio.js documentation that display song titles. One of them uses an <h1> to display the title and the other one uses a :before pseudo-element. No sign of a title attribute anywhere.

The fact that suggestion to use title attribute answered OP's question seems to be a happy coincidence.

@sphinx