28

Is there a way to add an audio player in a GitHub readme.md? I want to be able to play a certain MP3 file directly through the readme.md, rather than be directed to some SoundCloud or YouTube link.

4 Answers 4

12

As of May 2021, GitHub supports video uploads, and sort of supports audio uploads. While you cannot directly upload .wav or .mp3 files to GitHub, uploading a .mp4 or .mov file containing only audio gives an (albeit poorly-formatted) audio player: Audio player

You can convert .wav and .mp4 files into compatible video files with freeconvert.com or any similar converter.

Sign up to request clarification or add additional context in comments.

Comments

9

Update May 2021: as I already reported in "How to embed a video into GitHub README.md?", "Video uploads now is generally available"

video upload


Original answer 2017:

No, as I documented before, an <audio> element (or video) is not supported in GitHub Markdown.

For video, a workaround is to use an animated GIF, but for audio, having a placeholder linking to the actual audio seems to be the only way.

Comments

2

I had been struggling with this, GitHub does not support the <audio> tag in Markdown. Therefore, I decided to create a simple GitHub Pages site that reads the audio URL from the query string

https://gabalpha.github.io/read-audio/?p=<audio_url>

example

[Link text](https://gabalpha.github.io/read-audio/?p=https://archive.org/serve/TimeTraxMD/01.%20Music%2000.mp3)

You can embed this link within your markdown file

I hope it can be useful!

Comments

2

As of Nov 2024, you can just rename your mp3 to mp4 and upload it in the built-in editor:

GIF of uploading an MP3 converted to MP4 to GitHub

It plays just fine, at least for me. (Not sure if it was this way all along or was just recently made possible.)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.