Skip to content
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

Update document title when loading a new track #253

Closed
wants to merge 1 commit into from

Conversation

kmod-midori
Copy link
Contributor

This updates the title to something more informative than "LMS" by including title and album in the title. The media session API should be mostly sufficient on most platforms, but does not work reliably (or at all) on my Edge browser, so I propose this change.

That <unk> is just a placeholder, I still need to figure out how to do i18n from JavaScript.

@epoupon
Copy link
Owner

epoupon commented Aug 2, 2022

Hello!
Thanks for proposing this. I guess it would be easier to do this from the cpp file (MediaPlayer.cpp), see wApp->setTitle https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WApplication.html#a71a3f7da5abb9a76df94fab69ba61670
But actually we should not bother with "unkown" strings and just skip them, as it is done in lms in general

@kmod-midori
Copy link
Contributor Author

May I (shamelessly) ask you to convert these lines of code for me? I don't currently have a C++ development environment at hand (and I don't really know wt that well).

@epoupon
Copy link
Owner

epoupon commented Aug 6, 2022

Hi!
Well I have played a bit with this and I am afraid it messes the history: when navigating in the history we get irrelevant entries.
Other softwares (like apple music, deezer, etc.) just write what is being explored (like the artist name, the album name, etc.)
I have tested the latter and it is quite handy actually!

@kmod-midori
Copy link
Contributor Author

Yeah, didn't consider that it messes with the browser history. Anyway, any information at all is better than just "LMS" :)

I will need to look further into why Edge's media information API does not work on any of my system though...

@epoupon epoupon closed this Aug 7, 2022
@epoupon epoupon added this to the v3.31.0 milestone Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants