devsnd / cherrymusic

Stream your own music collection to all your devices! The easy to use free and open-source music streaming server.
http://www.fomori.org/cherrymusic
GNU General Public License v3.0
1.03k stars 187 forks source link

Page Title Blinking with Vivaldi/Chromium #664

Closed ycawidro closed 7 years ago

ycawidro commented 7 years ago

Hello,

I am using cherrymusic 0.38 (but it was the same on 0.37.2) and the title keep blinking from :

Server : Debian jessie armhf Client : Ubuntu 12.04 amd64 with Vivaldi Browser (1.7.735.46 (Stable channel) (64-bit)), Chrome/56.0.2924.88 Safari/537.36 Vivaldi/1.7.735.46

I have search through the source to find where I can stop this blinking as I find it quite annoying. (it kept catching my eyes while being on other browser tabs). Can you help me ? (It might be browser related but I have deactivated transcode and Firefox cannot play my mp3 which is fair)

Yanik

tilboerner commented 7 years ago

That sounds annoying, sorry! I'm not sure which title you're talking about. Is it the document title (window title bar / tab name)? Otherwise, could you take a screenshot and circle the area?

ycawidro commented 7 years ago

Sorry if I was not clear, I meant the "Tab Title" (document.title I may say in Javascript)

tilboerner commented 7 years ago

Thanks for clarifying. I can reproduce the blinking in a current build of Vivaldi, and I found the cause. The CherryMusic client updates the document title once a second so it can display the current song:

$('title').text(tabtitle);

Something that jQuery does behind the scenes (is it unsetting the text before setting it?) causes this hiccup. Using plain JS does not produce the flickering:

document.title = tabtitle;

@devsnd: Any reason why we should not be using the simple, plain Javascript here? Otherwise, I'll make this the fix.

ycawidro commented 7 years ago

Thank you this is a neat hack.

devsnd commented 7 years ago

@tilboerner No there's no reason why we shouldn't use plain javascript (I didn't put much thought into it i guess), feel free to patch it 💃

tilboerner commented 7 years ago

@devsnd In that case we're golden, the patch is already in the devel branch. Closing.