Community Wishlist Survey 2022/Multimedia and Commons/Audio links that play on click

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Random proposal◄ Multimedia and Commons  The survey has concluded. Here are the results!

Audio links that play on click

  • Problem: For referencing audio files inline, such as pronunciation demonstrations, wikis have relied on linking to the raw file using [[Media:...]], via templates like {{audio}}. But not all browsers support playing the linked file (which can be Ogg Vorbis, WAV, FLAC, WebM, Opus, or MIDI), causing them to download the file instead of playing it, even though audio files are now automatically transcoded into Ogg and MP3 specifically so that browsers can play them. And even when the browser supports it, this is not user-friendly as it suddenly sends them to a different page with nothing but a player on it.
  • Proposed solution: Create a parser extension tag like <audio file="Example.ogg">Link</audio> which fetches the derivative URLs and then converts to e.g. <a href="/wiki/File:Example.ogg" title="Example.ogg" data-audiolink="[{"src":"//","type":"audio/ogg"},{"src":"//","type":"audio/mpeg"}]">Link</a> and attach a handler that converts the JSON data to an HTMLAudioElement and plays it to the link's click event.
  • Who would benefit: Readers
  • More comments:
  • Phabricator tickets: T229169
  • Proposer: Nardog (talk) 07:37, 21 January 2022 (UTC)Reply[reply]


  • I think we should focus on releasing video.js instead, which may resolve the 'can't play arbitrary file types' problem. --Izno (talk) 23:41, 28 January 2022 (UTC)Reply[reply]
    • @Izno: It won't as long as [[Media:...]] is used, which leaves the playback entirely up to the browser. Nardog (talk) 08:30, 29 January 2022 (UTC)Reply[reply]
      TheDJ maybe should be interested then. Izno (talk) 18:08, 29 January 2022 (UTC)Reply[reply]
      I am, but I first want to see videojs out the door and used by everyone. —TheDJ (talkcontribs) 17:30, 7 February 2022 (UTC)Reply[reply]