It is currently November 19th, 2018, 8:13 am

WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Share your custom plugins and applications to enhance Rainmeter.
User avatar
tjhrulz
Developer
Posts: 221
Joined: October 13th, 2016, 1:28 am
Location: Earth

WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

tjhrulz » August 20th, 2017, 2:05 am

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-companion/jfakgfcdgpghbbefmdfjkbdlibjgnbli
Firefox: https://addons.mozilla.org/en-US/firefox/addon/webnowplaying-companion/
Note: While chrome requires no changes in Firefox you will need to go to the about:config page in Firefox and set network.websocket.allowInsecureFromHTTPS to true.

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 github: https://github.com/tjhrulz/WebNowPlaying
Link to Chrome extension github: https://github.com/tjhrulz/WebNowPlaying-ChromeExtension
Link to Firefox extension github: https://github.com/tjhrulz/WebNowPlaying-FirefoxExtension
You do not have the required permissions to view the files attached to this post.
Last edited by tjhrulz on October 30th, 2017, 9:27 pm, edited 3 times in total.
User avatar
dvo
Posts: 538
Joined: February 7th, 2016, 6:08 am

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

dvo » August 29th, 2017, 10:31 am

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:
User avatar
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

kyriakos876 » August 29th, 2017, 12:44 pm

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: 221
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

tjhrulz » August 29th, 2017, 2:16 pm

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: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

kyriakos876 » August 29th, 2017, 4:23 pm

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: 221
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

tjhrulz » August 29th, 2017, 4:34 pm

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: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

kyriakos876 » August 29th, 2017, 4:46 pm

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
User avatar
dvo
Posts: 538
Joined: February 7th, 2016, 6:08 am

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

dvo » August 30th, 2017, 10:45 am

and now it works good :) tnx for the info tjhrulz :D

FireFox : in the search bar you type:
about:config
and set
network.websocket.allowInsecureFromHTTPS to true
helloyou
Posts: 1
Joined: September 8th, 2017, 3:33 pm

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

helloyou » September 8th, 2017, 3:35 pm

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: 221
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

tjhrulz » September 8th, 2017, 9:03 pm

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.