It is currently March 29th, 2023, 10:54 am

WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Plugins and Addons popular with the Community
User avatar
tjhrulz
Developer
Posts: 266
Joined: October 13th, 2016, 1:28 am
Location: Earth

WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by tjhrulz »

Guess who's back? Back again? Tj's back with another music plugin. (I just realized that rhymes)

I finally got around to writing documentation so I figured I would post it here. If you ever wanted the full NowPlaying experience for web players now you can have it. Automatically switches between the supported web players but the list supported is: Youtube (Both new and old layouts), Twitch, Soundcloud, Google Play Music, Amazon Music, Pandora, Spotify, Tidal. You will need one of the browser extensions for this to work

Chrome: https://chrome.google.com/webstore/detail/webnowplaying-redux/jfakgfcdgpghbbefmdfjkbdlibjgnbli
Firefox: https://addons.mozilla.org/en-US/firefox/addon/webnowplaying-redux/

Documentation available in the README on the Github and I have an example included there. But to give the overview here.

Declared with PlayerType=

Title - String
Artist - String
Album - String
Cover - Path
Attributes:
DefaultPath=Path (Value of the measure when album art is still downloading)
CoverPath=Path (Value of the measure when album art is done downloading, where album art is downloaded to)
CoverWebAddress - String
Position - String
Duration - String
Progress - Percent (Double) MaxValue: 100
Repeat - 0, 1 or 2
Shuffle - 0 or 1
Rating - 0 through 5
Volume - Percent (Integer) MaxValue: 100
State - 0, 1, 2
Status - 0, 1 (1 if a single supported website is open)

As for supported bangs
SetPosition ### (Where ### is a double between 0-100, can be relative by adding + or - to beginning)
SetVolume ### (Where ### is an int between 0-100, can be relative by adding + or - to beginning)
Previous
PlayPause
Next
Repeat
Shuffle
ToggleThumbsUp
ToggleThumbsDown
SetRating # (Where # is 1 for thumbs down, 5 for thumbs up, or on sites using stars 1 through 5 like normal, 0 for no rating, )

Link to Rainmeter plugin's github: https://github.com/keifufu/WebNowPlaying-Redux-Rainmeter
Link to browser extension's github: https://github.com/keifufu/WebNowPlaying-Redux
Link to the NuGet adapter's github, using this you can integrate WebNowPlaying into other programs without having to reverse engineer the communication with the browser extension: https://github.com/keifufu/WNPRedux-Adapter-Library
You do not have the required permissions to view the files attached to this post.
Last edited by tjhrulz on March 4th, 2023, 9:27 pm, edited 6 times in total.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by kyriakos876 »

Nice job. I've been looking for something like this! thanks for sharing :)
dvo wrote:it doesn't support youtube ... :D firefox webnowplaying doesn't show title or artist ...
or do you need a account for this to on youtube? :?
if i load your skin with the plugin you say and open a youtube page and play it i only see na/na all other things are not reacting
on the skin :thumbdown:
It works fine with me (Vivaldi browser) but I am singed in on YouTube so that might be your problem.
User avatar
tjhrulz
Developer
Posts: 266
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by tjhrulz »

dvo wrote:it doesn't support youtube ... :D firefox webnowplaying doesn't show title or artist ...
or do you need a account for this to on youtube? :?
if i load your skin with the plugin you say and open a youtube page and play it i only see na/na all other things are not reacting
on the skin :thumbdown:
Woops I forgot too mention in the post that in order to get Firefox working you have to allow unsecure Websockets on secure webpages. Simply go to the about:config page in Firefox and set network.websocket.allowInsecureFromHTTPS to true. Thanks for catching that.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by kyriakos876 »

Hello friend, loving this plugin so far :)

Is it possible that you could add the following?
1) Views counter.
2) Dislikes counter.
3) Likes Counter.
4) Subscribe button.

-Thanks in advance!
User avatar
tjhrulz
Developer
Posts: 266
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by tjhrulz »

kyriakos876 wrote:Hello friend, loving this plugin so far :)

Is it possible that you could add the following?
1) Views counter.
2) Dislikes counter.
3) Likes Counter.
4) Subscribe button.

-Thanks in advance!
Is it possible, yes.
Will I add them? Not in the way you think and it may be a while before it happens. The point of this plugin is to support every website with the same feature set.

However if you go to spotify you will notice that I request a spotify token so that I can get a higher res album art and the correct album title. My long term plans are to add support for twitch to better fill out some missing info on live streams. Then I will start to make it so you can use many of the features of the spotify, twitch, and youtube APIs. In theory then you would be able to do what you want.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by kyriakos876 »

tjhrulz wrote:Is it possible, yes.
Will I add them? Not in the way you think and it may be a while before it happens. The point of this plugin is to support every website with the same feature set.

However if you go to spotify you will notice that I request a spotify token so that I can get a higher res album art and the correct album title. My long term plans are to add support for twitch to better fill out some missing info on live streams. Then I will start to make it so you can use many of the features of the spotify, twitch, and youtube APIs. In theory then you would be able to do what you want.
Sounds about right... I will let time do its thing then :D
helloyou
Posts: 1
Joined: September 8th, 2017, 3:33 pm

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by helloyou »

Is there some way to get the URL of the current song? Like with PlayerType=URL or smth.

I'd like to implement a button which copies the URL to your clipboard so that you can easily download the song.
User avatar
tjhrulz
Developer
Posts: 266
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by tjhrulz »

helloyou wrote:Is there some way to get the URL of the current song? Like with PlayerType=URL or smth.

I'd like to implement a button which copies the URL to your clipboard so that you can easily download the song.
Do you want the mp3 or the page? Because returning the URL the page is currently on is easy and I would be willing to add but returning the URL of the song itself for several of these is not possible with the current implementation because they have safeties to prevent getting that easily.
User avatar
balala
Rainmeter Sage
Posts: 15071
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by balala »

tjhrulz wrote:Do you want the mp3 or the page? Because returning the URL the page is currently on is easy and I would be willing to add but returning the URL of the song itself for several of these is not possible with the current implementation because they have safeties to prevent getting that easily.
Just a simple idea on how a video can be downloaded from YouTube. I don't know if this can be implemented in Rainmeter (never tried), but if you want to download it, you have just to add a ss, before the youtube.com, in the URL. Eg to download the video with the https://www.youtube.com/watch?v=s-YsO84qYak URL, you have to open the https://www.ssyoutube.com/watch?v=s-YsO84qYak URL. This URL will open a site where the video can be downloaded.
Again, I never tried to implement this procedure in Rainmeter, but someone could try.
User avatar
StArL0rd84
Posts: 415
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by StArL0rd84 »

Not a big coder so when I followed the link to the extension to the master files on the github page I got really confused as to how to install it in my browser. But then I searched the official Chrome extension site for it and found it.
Maybe you should mention in your post to find it there or provide a link.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))