-
-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client-Side checking of compatible audio format/codec/container (WebUI) #2051
Comments
That's a good idea! Will try to come up with something like this when working on the new transcoding. Thanks for the suggestion. |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help. |
Reporting a similar issue, when using Navidrome to play music, I sometimes encounter a problem where songs do not automatically move to the next track and instead pause in the last few seconds. Version:0.49.3 (8b93962) 589cdcd5bc909 deluan/navidrome:latest navidrome 146.23MB 2023/02/14 09:31:17 How Navidrome is installed? Configuration Relevant log output Anything else? Code of Conduct |
The current issue
Web Browsers don't support all the audio codecs/container combinations. Currently, if an incompatible file is attemped to be played and no transcoding profile has been selected before, the playback won't start and there is no error message.
This feels broken to the user and leads to bug issues like #1910 and #1441
We should at least give the user a hint what happened.
A clear and concise description of what you would like to happen.
The WebUI should check clientside if the currently selected song can be played in this browser.
Additional context
The compatability check could be done with the Browser audio.canPlayType method. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType
The audio.canPlayType method needs mimetype of the file. This can be ambigous (f.e. files encoded in ALAC codec have mimetype "audio/mp4", which isnt very helpful as "audio/mp4" can be a multitude of things...)
So the canplayType may needs to be augmented by "compatability/transcoding profiles", similar to how f.e. jellyfin handles it. I'll cross-post in #351
Steps
[x] Capture mimetype (lookup from file extension)
[ ] Capture music codec/container/format properly (e.g. with scanner extractor - as mimetype isnt precise enough**)
[] expose codec /bitrate /MIME type via api to frontend (add to "/api/song")
[] check if audio is playable
[] if not, at least give an error mesage (incompatible file type) that visible to the user
[] to be done later: Trigger a request for a transcoded file in a know-working format.
The text was updated successfully, but these errors were encountered: