keifufu / WebNowPlaying

WebNowPlaying browser extension. Provides support for browser-based players
MIT License
81 stars 10 forks source link

Stopped on close #20

Closed dethknite closed 3 months ago

dethknite commented 1 year ago

There seems to be instances where closing an application / tab / browser (in my case Youtube Music Desktop), where the StateMode "Stopped" is not sent/recvd, leaving Rainmeter skins blank and unhidden. I have two separate instance, one skin checks for the State of stopped (monstercat), the other does a hybrid of checking for stopped but also if audio playback is occurring and thus works okay (my custom skin). I am trying to look through the code to see if I can narrow anything down, but the best I can relate is that it appears if something is playing and closed, there is a possiblity that Stopped is never set / recvd.

keifufu commented 1 year ago

Stopped mode is poorly implemented as of right now, it's been on my to-do list for a while but I haven't gotten around to fixing it yet.

sudigra commented 1 year ago

i have problem too, with rainmeter x64, i have fixed problem with rainmeter x32 instalation and copy file from @Vault\Plugins\WebNowPlaying\0.5.0.0\32bit\WebNowPlaying.dll to C:\Program Files\Rainmeter\Plugins

I hope to help with my solution

keifufu commented 1 year ago

I'm a bit confused, YTMD doesn't support newer versions of WebNowPlaying. Let me know if this happens with the newest extension and rainmeter plugin on a regular browser.

dethknite commented 1 year ago

I use the Native API setting (as the Rainmeter Adaptor displays Monstercat even when nothing is open or playing). The old WebNowPlaying extension used to correctly detect when it was open and play. Perhaps you are correct, and YTMD simply doesn't support the WebNowPlaying Redux. I may delve down that thought process and review the source for YTMD to see the feasibility of such... but as for now, the Native API works almost as expected.

keifufu commented 3 months ago

The extension reports as stopped if no player is open, if this is a native-api issue with rainmeter then please create an issue on keifufu/WebNowPlaying-Rainmeter

dethknite commented 3 months ago

I "believe" the issue is that if youtube music is closed (without first pausing), a race is possible where it can result in rainmeter being left with the state of running and thus continues to display. I do not recall ever having this occur if I pause prior to closing Youtube Music. I may attempt to open a suggestion in youtube music desktop app I use to add a "send pause on close" option.