It is currently February 26th, 2024, 7:29 am

WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Plugins and Addons popular with the Community
Doggo_[無限]
Posts: 3
Joined: January 23rd, 2022, 8:13 am

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by Doggo_[無限] »

sorry about that, here it is

Code: Select all

[Rainmeter]
Update=200
Author=doggo
BackgroundMode=1
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]
MouseActionCursorName=Hand

[Variables]
@include=#@#Variables.inc
Scale=2.2

[MeasureAudioOutput]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTSize=4096
FFTOverlap=2048
FFTAttack=0
FFTDecay=150
FreqMin=50
FreqMax=16500
Sensitivity=35
Bands=7
____________________________________________________________
[MeterStyle]
BarOrientation=Vertical
X=(3*#Scale#)r
Y=(33*#Scale#)
W=(1.5*#Scale#)
H=(6*#Scale#)
Flip=1
BarColor=0,0,0

[MeasureStatus]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Status

[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Title
UpdateDivider = 5
Substitute="":"N/A"

[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Artist
UpdateDivider = 5
Substitute="":"N/A"

[MeasureAlbum]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Album
UpdateDivider = 5
Substitute="":"N/A"

[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Position
UpdateDivider = 5
Substitute="":"N/A"

[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Duration
UpdateDivider = 5
Substitute="":"N/A"

[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Progress
Substitute="":"N/A"

[MeasureVolume]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Volume
Substitute="":"N/A"

;The play state of the player
;0 is no song is selected, this will almost never happen as the plugin retains the last known song in the future I may change it so it clears when the websocket closes but I dont think I want to do that in the event the websocket closes unexpectedly you may want it to keep old data
;1 is playing
;2 is paused
[MeasurePlayPause]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=State
Substitute="0":"pause.png","1":"pause.png","2":"pause.png","3":"replay.png"
____________________________________________________________
[MeasurePositionX]
Measure=Calc
Formula=(63*#Scale#) + (27*#Scale#) * cos(PI/2 - (MeasureProgress/100) * 2 * PI)
DynamicVariables=1

[MeasurePositionY]
Measure=Calc
Formula=(65*#Scale#) - (27*#Scale#) * sin(PI/2 - (MeasureProgress/100) * 2 * PI)
DynamicVariables=1
____________________________________________________________
[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
____________________________________________________________
[MeterBackground]
Meter=Image
ImageName=#@#Background.png
X=(0*#Scale#)
Y=(20*#Scale#)
W=(226*#Scale#)
ImageAlpha=0
AntiAlias=1
UpdateDivider=-1

[MeterBackground2]
Meter=Image
ImageName=#@#Background2.png
X=(38*#Scale#)
Y=(40*#Scale#)
W=(50*#Scale#)
AntiAlias=1
UpdateDivider=-1
____________________________________________________________
[MeterRoundBar]
Meter=Shape
X=(0*#Scale#)
Y=(0*#Scale#)
Shape=Ellipse (63*#Scale#),(65*#Scale#),(27*#Scale#) | StrokeWidth (2*#Scale#) | Fill Color 255,255,255,0 | StrokeColor 255,255,255,255
Shape2=Arc [MeasurePositionX],[MeasurePositionY], ((63*#Scale#)+1),((65*#Scale#)-(27*#Scale#)),(27*#Scale#),(27*#Scale#),0,1,(Round([MeasureProgress]/100)),0 | StrokeWidth (2*#Scale#) | Stroke Color 100,100,100
DynamicVariables=1
____________________________________________________________
[MeterAlbumArt]
Meter=Image
MeasureName=MeasureCover
X=(38*#Scale#)
Y=(40*#Scale#)
W=(50*#Scale#)
MaskImageName=#@#mask.png
____________________________________________________________
[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Center
StringCase=Upper
FontFace=Quicksand Bold
FontColor=255,255,255
FontSize=(7*#Scale#)
X=(63*#Scale#)
Y=(94*#Scale#)
W=(120*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1

[MeterTitle]
Meter=String
MeasureName=MeasureTitle
StringAlign=Center
FontFace=Quicksand
FontColor=255,255,255
FontSize=(5*#Scale#)
X=(0*#Scale#)r
Y=(15*#Scale#)r
W=(120*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1

[MeterPosition]
Meter=String
MeasureName=MeasurePosition
StringAlign=
FontFace=Quicksand
FontColor=255,255,255
FontSize=(6*#Scale#)
X=(1*#Scale#)
Y=(119*#Scale#)
Text=""
AntiAlias=1

[MeterTotalPosition]
Meter=String
MeasureName=MeasureDuration
StringAlign=
FontFace=Quicksand
FontColor=255,255,255
FontSize=(6*#Scale#)
X=(109*#Scale#)
Y=(119*#Scale#)
Text=""
AntiAlias=1
____________________________________________________________
[MeterBar]
Meter=Shape
X=(25*#Scale#)
Y=(122*#Scale#)
Shape=Rectangle 0,0,(76*#Scale#),(1*#Scale#),0 | Fill Color 255,255,255,255 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*0.75*#Scale#),(1*#Scale#),0 | Fill Color 100,100,100 | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*0.75*#Scale#),(0.8*#Scale#),(4*#Scale#) |Fill Color 100,100,100 | StrokeWidth 0
Shape4=Rectangle 0,(-1*#Scale#),(76*#Scale#),(3*#Scale#),0 | Fill Color 100,100,100,100| StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]
____________________________________________________________
[MeterPrevious]
Meter=Image
ImageName=#@#Previous.png
X=(43*#Scale#)
Y=(130*#Scale#)
W=(10*#Scale#)
Group=DynamicColors
;Example of the previous bang
;Note this will go to the begin of the song then go to the previous song
LeftMouseUpAction=[!CommandMeasure MeasurePlayPause "Previous"]
AntiAlias=1

[MeterPlayPause]
Meter=Image
ImageName=#@#play.png
ImageTint=#Color#
X=(58*#Scale#)
Y=(130*#Scale#)
W=(10*#Scale#)
Group=DynamicColors
LeftMouseUpAction=[!CommandMeasure MeasurePlayPause "PlayPause"]
DynamicVariables=1

[MeterNext]
Meter=Image
ImageName=#@#Next.png
X=(73*#Scale#)
Y=(130*#Scale#)
W=(10*#Scale#)
Group=DynamicColors
;Example of the next bang, this skips to the next song
LeftMouseUpAction=[!CommandMeasure MeasurePlayPause "Next"]
___________________
User avatar
balala
Rainmeter Sage
Posts: 16021
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by balala »

Doggo_[無限] wrote: January 23rd, 2022, 12:59 pm sorry about that, here it is
What you want to achieve is related to the [MeasurePlayPause] measure. But as far as I can tell the substitution added to this measure is a little bit wrong, because it returns pause(.png) for all three values from 0 to 2 and replay(.png) (I suppose this is the image of "play" status) only for value 3. I didn't try your code (would be fine to have the involved images), but only looking to the code I'd try the following:
  • Remove the above mentioned Substitute option of the [MeasurePlayPause] measure.
  • Add to the same [MeasurePlayPause] measure the following options:

    Code: Select all

    [MeasurePlayPause]
    ...
    IfCondition=(#CURRENTSECTION#=1)
    IfTrueAction=[!SetOption MeterPlayPause ImageName "#@#Pause.png"][!UpdateMeter "MeterPlayPause"][!Redraw]
    IfFalseAction=[!SetOption MeterPlayPause ImageName "#@#Play.png"][!UpdateMeter "MeterPlayPause"][!Redraw]
    (I assumed here, perhaps by mistake, that the images used for the buttons are Play.png and Pause.png - if they have any other names, please replace the names in the !SetOption bangs).
  • If you added the above IfCondition, feel free to remove the ImageName=#@#play.png option of the [MeterPlayPause] meter, because this option is set now through the added IfCondition (however removing it is not mandatory).
Doggo_[無限]
Posts: 3
Joined: January 23rd, 2022, 8:13 am

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by Doggo_[無限] »

balala wrote: January 23rd, 2022, 2:35 pm What you want to achieve is related to the [MeasurePlayPause] measure. But as far as I can tell the substitution added to this measure is a little bit wrong, because it returns pause(.png) for all three values from 0 to 2 and replay(.png) (I suppose this is the image of "play" status) only for value 3. I didn't try your code (would be fine to have the involved images), but only looking to the code I'd try the following:
  • Remove the above mentioned Substitute option of the [MeasurePlayPause] measure.
  • Add to the same [MeasurePlayPause] measure the following options:

    Code: Select all

    [MeasurePlayPause]
    ...
    IfCondition=(#CURRENTSECTION#=1)
    IfTrueAction=[!SetOption MeterPlayPause ImageName "#@#Pause.png"][!UpdateMeter "MeterPlayPause"][!Redraw]
    IfFalseAction=[!SetOption MeterPlayPause ImageName "#@#Play.png"][!UpdateMeter "MeterPlayPause"][!Redraw]
    (I assumed here, perhaps by mistake, that the images used for the buttons are Play.png and Pause.png - if they have any other names, please replace the names in the !SetOption bangs).
  • If you added the above IfCondition, feel free to remove the ImageName=#@#play.png option of the [MeterPlayPause] meter, because this option is set now through the added IfCondition (however removing it is not mandatory).
Image

omg thx it works
User avatar
balala
Rainmeter Sage
Posts: 16021
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by balala »

Doggo_[無限] wrote: January 23rd, 2022, 3:07 pm omg thx it works
Great! :thumbup:
bedoy
Posts: 3
Joined: October 18th, 2022, 9:28 am

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by bedoy »

I am not sure if this is the right place to write this but i can't seem to get the plugin to work. There are no information shown and the buttons don't work.

I am using Edge and when i hover over the extension it says "Connected and sending info", so it seems to be working fine.
Then i checked the Rainmeter.log file and i saw this line.

Code: Select all

ERRO (12:26:16.584) : WebNowPlaing.dll - Error converting volume to integer, volume was:55.00000000000001
I tried it with the example skin 0.4.0 and 0.5.0 and got the same results.
efozm
Posts: 6
Joined: January 2nd, 2023, 4:11 pm

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by efozm »

bedoy wrote: October 18th, 2022, 9:44 am I am not sure if this is the right place to write this but i can't seem to get the plugin to work. There are no information shown and the buttons don't work.

I am using Edge and when i hover over the extension it says "Connected and sending info", so it seems to be working fine.
Then i checked the Rainmeter.log file and i saw this line.

Code: Select all

ERRO (12:26:16.584) : WebNowPlaing.dll - Error converting volume to integer, volume was:55.00000000000001
I tried it with the example skin 0.4.0 and 0.5.0 and got the same results.
Mine doesn't work at all, not with the example skin or any other skin. I can't even pause/unpause the song.

Image

Edit: Temporary solution found. Please check: https://forum.rainmeter.net/viewtopic.php?t=41741

I don't know if the creator of this plugin is still active but he should really check it too.
User avatar
xenium
Posts: 827
Joined: January 4th, 2018, 9:52 pm

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by xenium »

tjhrulz wrote:
The Spotify Desktop Player (with Spicetify) is no longer supported by Rainmeter if the new WebNowPlaying Redux plugin is installed

With the old WebNowPlaying 0.5.0 plugin, Spotify Desktop Player is supported by Rainmeter.
User avatar
tjhrulz
Developer
Posts: 267
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by tjhrulz »

xenium wrote: March 6th, 2023, 2:42 pm The Spotify Desktop Player (with Spicetify) is no longer supported by Rainmeter if the new WebNowPlaying Redux plugin is installed

With the old WebNowPlaying 0.5.0 plugin, Spotify Desktop Player is supported by Rainmeter.
This is an issue on spicetify's side that has already been fixed but since they have not rolled out a new release is not live for the standard download. This is why the browser extension does not report 0.5 as outdated.

I would recommend that users and skin developers continue to use 0.5 until the next spicetify release which should be in a week or so. Once the new spicetify version is out the browser extension will then let you know that the plugin is out of date.
User avatar
xenium
Posts: 827
Joined: January 4th, 2018, 9:52 pm

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by xenium »

tjhrulz wrote:
Version 2.0.0 of the plugin displays the album art with the logo at the bottom
Can this be fixed?
WebNowPlaying 2.0.0.PNG
The previous version (1.2.0 )displays ok
WebNowPlaying 1.2.0.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
keifufu
Posts: 36
Joined: March 10th, 2023, 2:23 pm

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by keifufu »

xenium wrote: May 15th, 2023, 6:16 pm Version 2.0.0 of the plugin displays the album art with the logo at the bottom
Can this be fixed?
WebNowPlaying 2.0.0.PNG

The previous version (1.2.0 )displays ok
WebNowPlaying 1.2.0.PNG
Haven't seen it do that before.
What version of windows are you on?
Perhaps it's caused by a Spotify setting/modification?

Can't replicate on Windows 11 with the latest Spotify version.