tjhrulz / webnowplaying-browserextension Goto Github PK
View Code? Open in Web Editor NEWThe extension to go along with the WebNowPlaying plugin for Rainmeter
The extension to go along with the WebNowPlaying plugin for Rainmeter
Getting this error while on YouTube using Firefox Quantum (69.0.1). Tried reinstalling the extension and relaunching Rainmeter, but no change. I turned on Debugging with Rainmeter, and got this whole error.
Web Error:TypeError: document.getElementById(...).children[0].children[0].children[1] is undefined
This error logs constantly. With a single song that's just paused, I get about 14 in a 10 (ten) second period. With a playing song, especially when the song is in a playlist, I got 20 in 1 (one) second.
I personally fixed it by using
document.getElementsByClassName("yt-simple-endpoint style-scope yt-formatted-string")[0].innerText;
Cheers!
I was trying to figure out why Firefox was making the extension's WebSocket connections into secure ones (causing the extension not to connect correctly to Rainmeter). After playing around, I found out that it was HTTPS Everything causing this, disabling it on for example SoundCloud seems to resolve issue but is there anything that can be done about it (except adding an exception for the current site)?
Hello, I have an issue that seems nobody had before. Disclaimer: I use Firefox Nightly, always last version, tried with Chrome but no results.
On Firefox, the icon extension is a green puzzle piece, and when I put the cursor on it, it says: "Not connected to Rainmeter. Click to troubleshoot." But clicks don't work. I even noticed that in Rainmeter logs, every 0.3 seconds the program throws this error: "ImageName: Unable to open: C:\Users\Alessandro\Documents\Rainmeter\Skins\Monstercat-Visualizer\Song Information\Cover\0.png (Monstercat-Visualizer\Song Information\Cover\Cover.ini)" I don't know if it's related to the plugin itself. Rainmeter is enabled in Windows Firewall, for public and private network. MV is already on WebNowPlaying. I have, of course, changed the network.websocket.allowInsecureFromHTTPS to true in about:config. Any tips? Or I'm missing something? As for the websites, I've tried YouTube and SoundCloud, but it seems an extension problem.
This seems to be the only thing not updated when the page is not visible. Given that they do not use an HTML5 audio object I do not have a nice way to just go around this. The progress bar also is a canvas so I can not extract it from that.
So spotify has slightly changed how they do their album art, now instead of it sometimes being low res it is now always low res.
My general rule of thumb when it comes to album art is do the best you can get, and the issue is in this case the best I can get on the webpage is 64x64 which is pretty low res. Now with their API I can get higher but given how rate limited that is and with the userbase there is that will not scale well.
So if anyone knows of a good reliable way to do this feel free to lend a hand
When I play Spotify Web Player with extension, it doesn't appear on Song, Artist, Playback state, Progress bar, etc.
WNP Extension Version: v0.4.7
Browser: Google Chrome v80.0.3987.132 (Official Build)
this does not seem to pull a value for the Album Name at all with the companion extension using SRWare Iron web browser.
Also the repeat works, but only use a value of 0/1.
0 = Repeat Off
1 = Repeat 'All'
0 = Repeat 'One'
After installing WebNowPlaying-BrowserExtension in Firefox, I coudn't see the Options page. The page is called Options.html, whereas in manifest.json it is options.html.
I could make the options visible by changing options.html to Options.html in extensions.json in my Firefox profile.
Roel
Covers just aren't working for youtube music. They're working fine for other services. I looked into the code and found that the element for getting the cover seems to have changed. It's class is now image style-scope ytmusic-player-bar
. There seem to have been other changes as well and I couldn't figure out how to efficiently debug this so I gave up on trying to fix this myself. If you have any questions I'm happy to help
Just thought I'd ask to see if it's just me. This just started this week for me, and I'm getting the same bug with my own fork as well as the original. With media playing in an inactive tab (e.g. some other tab is selected/focused/whatever), if I hit play/pause, the media instantly plays/pauses but rainmeter receives the info update 2-3 seconds later. For some reason, the lag is a lot longer when pausing from a played state than it is when playing from a paused state.
If I select the tab that's playing the media and do the same thing, the latency is gone. I'm totally convinced this is not caused by javascript/DOM throttling because there's a delay before those systems define an inactive tab as idle and start throttling it, and even if there wasn't, the 2-3 second delay is way more severe than you'd get from idle throttling. Plus javascript throttling has been around forever, and this just started recently.
I also did some testing to see if it was on the plugin's or rainmeter's end. I can't completely rule it out but I have confirmed with timestamps that the messages are being sent late, not being received late.
So my suspicion is this is a firefox regression, something must have changed in how it handles websocket messages from content scripts running in inactive tabs.
I'm also getting another (presumably unrelated) bug, as evidenced by error messages in the rainmeter logs:
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int16.Parse(String s, NumberStyles style, NumberFormatInfo info)
at WebNowPlaying.Measure.WebNowPlaying.OnMessage(MessageEventArgs arg)
WebNowPlaing.dll - Error converting duration into integer
And yeah the spelling WebNowPlaing.dll is verbatim copied from the logs. I haven't looked much at the plugin source code but since I forked the browser extension I'm positive this misspelling isn't present anywhere in the extension, it is probably in the plugin? These error messages primarily occur when the browser extension stops/starts/updates or the browser itself quits. However, on one occasion I got these error messages randomly while just watching a youtube video and it caused a massive display bug, like characteristic frozen glitch artifacts on screen and the music stuttering rapidly in that loud, startling way like you might get before a blue screen of death. It did that crazy glitch clusterfuck stuff for like 3 seconds and then went back to normal lol. I would never have guessed it had anything to do with rainmeter or webnowplaying plugin, so it wasn't until a bit later when I actually checked the log and saw the error message exactly coincided with the display bug. Maybe it's a rainmeter bug honestly because idk how the plugin could possibly do that.
This would make for a better next previous experience than is possible in the current one.
Currently if you click forward I go to the recommended video and if you click back I go back a page. However it is then possible to go back to the default youtube page with no video and no way to go forward and your info from you last video still being displayed (Also fun fact you can actually start your last watched video if you hit play :P even though you are not on that page anymore). I think I will add a quick fix to make going forward better but to make the whole experience better I will have to cache the history of youtube tabs.
The extension not working as well
Plex updated and it's not Showing text for Artist, Album or Song.
Greetings,
I find your code fascinating. I would love to find support for Stingray Music Webplayer. It's big in Canada. I wouldn't know about the rest of the world. There are literally thousands of radio channels on there.
Here's a quick link to the web player. You can sign up for a free account with an email address and get a 7 days trial.
https://webplayer.stingray.com/
The way the website works is fairly similar to that of the old youtube. It would require pulling elements by class from a dynamic webpage. This I can figure out, but the rest of your code still throws me off base for the moment.
Regards,
When listening to a "Station" on Amazon Prime there is no "Shuffle" or "Repeat" available. This makes Rainmeter throw both a "Web Side Error:Error updating shuffle for Amazon Music" error and a "Web Side Error:Error updating repeat for Amazon Music" error every 100ms. However, when listening to an album or other playlist where "Shuffle" and "Repeat" are available, these errors do not occur.
Ever since chrome implemented this feature, the playback controls has broken for YouTube.
**Enabling "attempt general script everywhere" does not fix it.
What still works:
What partially works:
What doesn't work (or maybe input detected, but no effect shown):
Rainmeter Version: 4.3.1.3321
OS Version: Windows 10 Pro 2004 64-bit (build 19041) - English (1033)
Skin Version: 2.1.0
Spotify Version: (Probably irrelevant, but) 2.1.5
Chrome Version: 84.0.4147.125 (Official Build) (64-bit)
The chrome feature appears when a media is playing. (Example, YouTube.)
The issue was posted on Monstercat Visualizer, before they directed me to open an issue here.
As the title says.
Since Firefox checks that any websockets on a secure page are also secure any Firefox user would need to go to the about:config page in Firefox and set network.websocket.allowInsecureFromHTTPS to true.
I am sorry that you have to do this for the time being, but using a self signed SSL Certificate would likely throw more errors even though the connection is only over localhost.
works with everything else but just not spotify for some reason
With the recent update to Chrome, dark mode has been enabled for the browser. It would be nice to have the ability to switch out the extension icon to a lighter version to help spot it, as at the moment black on grey can be a bit hard to see at times.
Tidal has added obfuscation to their webpage to make using a pain in the ass. This will be fun working around this and may delay current release.
I've saw an error on Rainmeter log was "Web Side Error: Error updating cover for Spotify"
I use Spotify Web Player with WNP Extension v0.4.6 (Sep 18th 2019)
Unless the mouse is over the youtube video the position of the video is not updated.
This is one I have seen requested repeatedly, if you want support or are working on support please say so here
Firefox: v73.0.1
WebNowPlaying: v0.4.7
Site: Google Play Music (https://play.google.com/music/listen)
I have a skin that queries the STATE of the WebNowPlaying extension. When Google Play Music is not loaded, STATE=0. When I open Google Play Music but do not play anything, STATE=0. When I play and pause music STATE=1 or 2 respectively. When the music finishes playing or I clear my current playlist (meaning the play button on the website becomes greyed out), STATE=2.
I believe that when no music is playing (meaning music has finished playing or the playlist is empty), STATE should always =0.
The extension doesn't work on tidal for me - it works on other sites like youtube and soundcloud, but for whatever reason nothing shows up when playing from tidal.
Hi Trevor!
I like the idea of this extension and the Rainmeter plugin, and I want to contibute this project somehow.
I noticed all scripts, which gather track information, duplicate common code (WebSocket setup, event dispatching, clicking on elements etc). I suggest to extract all the code to a single module (I named it 'connector') and share it between all scripts. I pushed changes that describe the idea better: https://github.com/alexesprit/WebNowPlaying-ChromeExtension/tree/example.
The possible future improvement is to add a background script that will inject content scripts into a page, so you don't need to include 'connector.js' for every website.
Should I continue this work, and is there a chance these changes will be accepted?
Hello, avast warns me about the Firefox plugin cause its "insecure"
This may be easier to solve though if it is possible to just override the foreground check to always be true.
I have no idea why.. but it doesn't work on this version... I tried in on my Normal Firefox Version. and it works there but not on the Developer Edition.
I am able to install the extention on opera through chrome extension store but it isn't working. It would be awesome if you could make it working if it's not too much work !
So it doesnt work with Chrome incognito tab even if i enable the extension in incognito mode.
Can you please fix there ?
Im trying it with youtube and it doesnt work in incognito tab.
EDIT: It doesnt work with youtube.com/tv if u know what i mean.
Is there a way to up the resolution, 64x64 is a bit small.
I'm using the extension for Spotify.
This is in relation to rainmeter. it is managing to grab everything but album art.
https://music.youtube.com/ - site with issues
I am trying to play from Soundcloud, but it does not work with other sites as well. My Lano visualizer works with foobar2000 when I tested it. I have restarted Chrome and, since then, my PC. In the general.ini menu on my visualizer there is no option for web media players, so do I have to do something for it to show up? Help would be appreciated, thanks!
Deezer seems to be using some sort of voodoo magic to control when to show the volume bar so I can not get it to trigger programmatically. I think it is related to its parent div also pointlessly having a hover trigger that changes its background but trying to toggle both did not help.
I have a few potential workarounds I can try but I have dedicated enough time to this issue and do not want this issue to delay the release of the rewrite.
It shows listening Soundcloud but not show cover
I usually used chrome and it's working perfectly with webnowplaying plugin but when i used the Firefox Quantum 57.0.2 (64-bit) it's not working with my skin, so i tried using the example skin even so it's not working so is it just me?
When playing from Deezer, no information is detected (album art is blank, title and artist is blank, no progress bar). Youtube support works fine, so it's not a connection issue. I'm using Deezer free, Brave with the Chrome Web store extension, and the Monstercat Visualizer FYI.
Tried with both Firefox and Chrome (Firefox has the websocket change in the config page as well), just says Fetching... for both top and bottom text for both browsers on youtube and soundcloud.
i have searched trough the web before opening an issue, neither my antivirus or my windows defender are blocking rainmeter in any ways, rainmeter version is updated to the latest (4.3.1.3321 64-bit)
firefox flag network.websocket.allowInsecureFromHTTPS is set to true, and the webnowplaying plugin is installed in rainmeter, i get this message from the extensions
no skin supporting webnowplaying works, not even the example skin you get when installing the webnowplaying plugin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.