-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
No audio in Safari (macOS and iOS) #105
Comments
Hi! |
No errors appear in the debug panel, but changing the transcode format to 'mp3' fixes the issue (for both macOS and iOS). No other format seems to work, however I think we can blame that on Safari. |
Hmm this is strange. |
Testing in macOS Safari, attempting to play 'Golden Hour' from the album 'Petal' (on the demo site) refuses to play with the default transcode settings:
I can't adjust the settings on the demo site so I don't know what would make them work. On my own instance, playing an mp3 with 'Enable Transcoding' set to 'Never' refuses to play, but with it set to 'Only when format is not supported' and 'Transcode Format' set to 'mp3', it enables transcoding and plays successfully. Dragging the source mp3 onto a new tab in Safari plays it just fine, so I'm not really sure what's going on. |
Ok thanks for your investigation, it looks like there is something that is not well handled in LMS's player with native files |
I tested on an ipad and an iphone and I confirm, transcode format mp3 does the trick indeed. |
Did you notice any useful error in the logs on your apple devices (not sure it is easy to get though)? |
Maybe this error that comes up often ? ( server side only, I do not have an apple computer so no log examination for me unfortunately ) |
Do you have a reverse proxy that may timeout the connection? Do you reproduce when you connect directly without the reverse proxy? |
With or without the proxy the issue stays the same, I made a little capture for you to see. |
Well, I attest that the latest iPadOS Safari cannot play music from the web interface. How about referring to the NPR's streaming code? I am not a web programmer, so I don't know how it works, but it seems to be the best player example for iPad Safari. If you visit https://www.npr.org, there is an "On Air Now" play button at the top-right corner. iPad Safari could play that audio stream and moreover, the stream did not stop when I turned off the screen. Whatever NPR is using, this is better than those web player interfaces of other streaming servers, because those players were stopped when turning off the screen. |
Thanks for testing @HubKing. I guess you can't access any valuable error log on the client? |
And more important, is it also the case with the epoupon/lms:915e114 image? |
Nah, Safari on iPad still can't play music with that Docker image. I don't know how to access debug output of iPad Safari. If the same problem happens on mac Safari, it probably easier to get debug output of mac Safari. Anyway, here is the server's log when I tried to play an MP3 song in iPad Safari.
|
Just had the same issue. I fixed it by setting encode to "always" and "mp3" in settings. Then both Safari and iOS browsers will work. |
Thanks for reporting this. |
Yep. I only have mp3 files and had to do it anyway. |
Ok, and if you set to transcode only if needed to mp3, does it work ? |
No, that was the default and it does not work. It has to be set to always. |
Ok, would you accept to test a change? If yes, which lms version are you using (arch, docker)? |
Sure. I'm using the docker version. |
Amd64? |
I’ve been using docker version on arm (pi4) but I can also test on my intel machine. It will just take a little longer because of some network settings. |
Ok and last question: 32 or 64bits? |
And another last question: what if you set to never transcode? |
64bits for both arm and intel. never transcode does not work. It has to be on always and mp3 |
I'm looking at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio Loading a pure form .mp3 works fine, the exact sample works fine in Safari.
Substituting what is being provided from LMS fails.
But that works in Firefox. However, looking at the spec if you specify the codec, it works fine in Safari.
I am not quite sure how this is formed in the code yet, but will try to branch it and test it. I am not quite sure how you determine if transcoding needs to occur or not. For reference how LMS will format the audio tags. This example works. I suspect rather than a dynamic tagging system, targeting both mpeg and ogg. Seems reasonable to edit the template. https://thepaciellogroup.github.io/AT-browser-tests/test-files/audio.html https://github.com/epoupon/lms/blob/6898a4096a7d4f999f08102f26b92d48a64d75e1/approot/mediaplayer.xml |
I have forked this and am trying some changes. I think it is reasonable to use a conditional here. Otherwise need to define the relationship between transcode or not, still not sure how that is triggered, how does it know to transcode? /workspaces/lms/docroot/js/mediaplayer.js Kinda hate JS, but using some references ... we should prefer the higher quality ogg vorbis format first. Issue here still is if transcoding is set to something other than what the browser supports. Probably need to rethink the tagging and transcoding relationship - in the same file. http://diveintohtml5.info/everything.html
Will see if I can test it and do a pull request. The other logical solution ... exotic. |
Thanks for investigating this! For the record:
The transcoded file resource sets the mimetype in its response, so thanks to your investigations I think this is why it works. |
@obiwantoby could you by chance test the |
Yeah, I can switch around from the one I compiled, will report back. |
Thanks! you can also just apply bf0f8b7 if it is easier for you |
Safari desktop seems fine. Safari iOS is better but is failing on some FLAC collections, that otherwise worked. Trying to play around with it more. |
Confirmed epoupon/lms:bf0f8b7 fails on iOS. |
Does it fail for all files or just for flac files? |
Well no, other files, of which I only have MP3 and some AAC are fine. FLAC fails, but only on iOS. where as before everything would play. |
Ok thanks for testing! Will merge this first fix then, since it is better than before. |
I've noticed this in my own instance as well as the demo instance. Attempting to play any track will change the 'play' button to a 'pause' button, but there is no audio and the progress bar does not move.
The text was updated successfully, but these errors were encountered: