Background
Phonos allows you to link to an audio file without providing any IPA, i.e. <phonos file="Example.ogg" />. This on the surface would seem to satisfy the Audio links that play on click wish from the 2022 survey (T229169). The issue however, for both that wish and Phonos, is that some formats such as OGG are not natively playable on MacOS/iOS/Safari or some combination thereof. On WMF wikis, TimedMediaHandler takes care of this for you. Phonos does not, so these users will get no audio.
Acceptance criteria
- Use the TimedMediaHandler backend to fetch MP3 derivatives, if they exist
- If no MP3 derivative exists, serve the original file format instead
QA notes
- Find an existing file that does not have an MP3 extension. Using it in Phonos, it should still play an MP3, if that derivative exists. It usually does, but not always.
- Examples of files with MP3 derivatives:
- Example.ogg
- Voiceover-mathml-example-1.wav
- Wikidata items Q1 and Q2
- Example of a non-MP3 file with no MP3 derivative:
- Or-ଓଡ଼ିଆ 01.oga
You can check if MP3 derivatives are available by looking under the "Transcode status" section on the file page. I.e. at File:Or-ଓଡ଼ିଆ_01.oga you'll notice there is an MP3 derivative, but it is marked as "Not ready", hence why we don't get an MP3 in Phonos. Example.ogg on the other hand shows the MP3 derivative is available.
Using Special:MediaSearch on Commons and choosing a file format is an easy way to find more examples. The above examples may not apply to Beta.