Playing MP3 next to the button to download the file

(Pirat) #1

I propose to make playback of MP3 files on the site

(Jeff Atwood) #2

Not a typical use case, most sites don’t want to host music files, and would embed them from SoundCloud or YouTube or similar.

However, this does work for local videos, so it is fair to ask if it should for audio files as well. I assume most browsers support native MP3 playback like they support MP4 video?

(Khoa Nguyen) #3

Yes. Most of major browser. It’s a part of HTML5

(Jeff Atwood) #4

Let’s see, here’s a locally uploaded mp3 file:

198.mp3 (110.7 KB)

We should provide more of a native player experience there for the local upload. Compare with the remote link

@techapj can you add this to your list.

(Pirat) #5

I propose to make the player from discoors was to mp3

(Pirat) #6

I found something that you can use and what I mean :success:

(mountain) #7

It is better to use the browser’s native ui for the audio player so Discourse is not dependent on third-party code.

(Pirat) #8

but just will not be there download button
it needs to be modified

(mountain) #9

If you right click the audio player near the ‘play’ button, it will offer a selection of options. One of them is to download the audio. :smile:

(Pirat) #14

so cool

(Thomas Purchas) #15

That would not be obvious to most users. Discourse shouldn’t rely on browser UI to support simple features like downloading an uploaded file.

(mountain) #17

By that reasoning then the default browser UI is fundamentally flawed. Then it is more than just Discourse’s problem.

If the default isn’t working for the internet at large then someone needs to say something.

(Mittineague) #18

Seems to me that most users would be content to either not play it or play it when they were there, and that any interested in downloading would already be familiar enough with their player to know how.

I think it would be unmaintainable and things would get very cluttered if specific instructions were provided for everything someone might not know how to do.

(mountain) #19

It may also relate to their own browser. Firefox may be different from Chrome may be different from Safari, ect. I don’t know specifically if the ui is universal across browsers. But I have no doubt a simple google search will bring up something if a right-click exploration (as I did) was not relevant for them to do.

(Jeff Atwood) #20


IE 11

(Thomas Purchas) #21

No, the UI perfectly suits the problem for playing media files. In the same way the the <img> tag UI perfectly suits the problem of viewing images.

But Discourse offers additional UI for all uploaded files. It offers a simple preview if the browser supports the format, and also offers a download button.

For consistency an MP3 previewer should also offer a download button of some variety for Discourse hosted files.

Default browser UI allows you to download almost any type of content by right clicking it, but Discourse always offers an explicit download button for uploaded content. Audio files shouldn’t be an exception.

(mountain) #22

Which is easy by simply adding the original link at the bottom of the audio player that the player was intended to replace.

As to adding that, I suggest submitting a PR, if the developers agree with your sentiment.

(Jeff Atwood) #23

You could make the same argument about browser images.

Downloading images is too complicated! Every image on the web should have a “download” link next to it!

(Mittineague) #24

Isn’t there already a link?

(Jeff Atwood) #25

Sort of, but that would only cover top n links.