haiwen / seahub

The web end of seafile server.
seafile.com
Other
529 stars 368 forks source link

Support Playing WAV / AIFF files in-browser #5359

Open doug86i opened 1 year ago

doug86i commented 1 year ago

It seems strange that the interface can play mp3/mp4/ogg and a bunch of other formats but not good old WAV files.

We run an audio production house and this limitation is unfortunately stopping us fully adopting Seafile.

Many thanks for anyone that's willing to take this on!

All the best,

Dx

freeplant commented 1 year ago

We use a library called video.js to display videos. WAV / AIFF is not supported in video.js.

doug86i commented 1 year ago

Hi freeplant.

I’ve got to say, that’s a particularly dismissive attitude. And your answer far from completes this issue.

You may not see this as an issue but for us it’s show stopping. And I can’t imagine that we’re alone. Almost all browsers support playing wavs natively so it should be trivial.

I’ll head over to video.js and see if they are more helpful.

Failing that I’ll see if there is an alternative library with better file support.

doug86i commented 1 year ago

Looking into it deeper, it seems that WAV support was merged into video.js in 2020:

https://github.com/videojs/video.js/pull/6657

It's also listed as a mimetype here:

https://docs.videojs.com/utils_mimetypes.js.html

Would you consider reopening this issue?

freeplant commented 1 year ago

Thanks for the notificaiton. My knowledge about video.js was outdated. We can add support for wav files in version 10.0.

Show-vars commented 1 year ago

Thanks for the feedback. It would be great to add support of few more common audio formats like opus and flac since all you need to do is add the desired file extensions to the list at this line. If your browser is not too old everything will work right away even in version 9 of seahub.

Of course I could open a pull request but I think the changes here are too small for this 😳