It is currently October 9th, 2024, 3:56 am

WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Plugins and Addons popular with the Community
User avatar
StArL0rd84
Posts: 426
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by StArL0rd84 »

REALLY awesome plugin man, been looking for this...

I am trying to make a clickable seekbar, but it has proven to be quite difficult because of the way the command works.
[!CommandMeasure "mProgress" "SetPosition +10"] works to skip 10% forward,
but i am using a invisible overlay over the bar to calculate the mouse position over the bar.
I then send that calculation to mProgress as shown below.
But that percentage i arrive at from my calculation is from the beginning of the bar to the point i am clicking at.
Not from the point of progression of the song to where i am clicking.
I guess what i am trying to say is that i might need a little help with the math ;P
Or even another approach to this.
But i feel like it should be possible some how.
seekbar.png

Code: Select all

[mProgress]
 Measure=Plugin
 Plugin=WebNowPlaying
 PlayerType=Progress

[Progress]
 Meter=Bar
 MeasureName=mProgress
 X=r
 Y=30r
 W=200
 H=6
 BarColor=255,255,255
 SolidColor=0,0,0,100
 BarOrientation=Horizontal
 
[mProgressFormula]
  Measure=Calc
 
[ProgressClickArea]
  Meter=Image
  X=r
  Y=-9r
  W=[Progress:W]
  H=24
  SolidColor=55,10,0,100
  LeftMouseDownAction=[!SetOption mProgressFormula Formula "(($MouseX$)/([Progress:W])*100)"][!Update]
  LeftMouseUpAction=[!CommandMeasure "mProgress" "SetPosition [mProgressFormula]"]
  DynamicVariables=1
SeekbarExample_1.0.rmskin
EDIT: So i managed to get the math right, but it just skips to the end or beginning of the song still. hmm
And if i spam the bar it some times work. double hmm

Code: Select all

[mProgressFormula]
 Measure=Calc
 OnChangeAction=[!CommandMeasure mProgress "SetPosition [mProgressFormula]"]
[ProgressClickArea]
 Meter=Image
 X=r
 Y=-9r
 W=[Progress:W]
 H=24
 SolidColor=55,10,0,100
 LeftMouseUpAction=[!SetOption mProgressFormula Formula "((($MouseX$)/([Progress:W])*100)-[mProgress])"]
 DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
CyberTheWorm
Posts: 858
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by CyberTheWorm »

Try adding this to your skin

Code: Select all


[Progress]
 Meter=Bar
 MeasureName=mProgress
 X=r
 Y=30r
 W=200
 H=6
 BarColor=255,255,255
 SolidColor=0,0,0,100
 BarOrientation=Horizontal
LeftMouseUpAction=[!CommandMeasure WebNowPlaying "SetPosition $MouseX:%$"]
Have not used the WebNowPlaying plugin but the following mouse action does work for the NowPlaying plugin
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5538
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by eclectic-tech »

If you check the log, you should see this message:
Nothing to see here... had the previous version of the plugin :uhuh:
Last edited by eclectic-tech on October 5th, 2017, 7:12 pm, edited 1 time in total.
User avatar
StArL0rd84
Posts: 426
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by StArL0rd84 »

CyberTheWorm wrote:Have not used the WebNowPlaying plugin but the following mouse action does work for the NowPlaying plugin
Wow! Thanks, $MouseX:%$ totally works.
And it's so simple too, cleans up my code a lot.

Here's my almost finished skin:
Applied the same trick to the volume bar :)
almostfinished.png
YoutubePlayer_1.0.rmskin
You do not have the required permissions to view the files attached to this post.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
CyberTheWorm
Posts: 858
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by CyberTheWorm »

StArL0rd84 wrote:Wow! Thanks, $MouseX:%$ totally works.
And it's so simple too, cleans up my code a lot.

Here's my almost finished skin:
Applied the same trick to the volume bar :)
That will only work for a horizontal bar, just a FYI, vertical bar gets weird.
Just paying back for all the help I got ;-)
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by fonpaolo »

CyberTheWorm wrote:That will only work for a horizontal bar, just a FYI, vertical bar gets weird.
Just paying back for all the help I got ;-)
Maybe you say it gets weird because it's inverted, when using with a vertical bar?
Use the formula 100-$MouseY:%$ *

*Since $MouseY:%$ is calculated from top to bottom, but the bar increases from bottom to top.
User avatar
CyberTheWorm
Posts: 858
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by CyberTheWorm »

fonpaolo wrote:Maybe you say it gets weird because it's inverted, when using with a vertical bar?
Use the formula 100-$MouseY:%$ *

*Since $MouseY:%$ is calculated from top to bottom, but the bar increases from bottom to top.
Yes that is what I meant :D
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
tjhrulz
Developer
Posts: 268
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by tjhrulz »

StArL0rd84 wrote:Wow! Thanks, $MouseX:%$ totally works.
And it's so simple too, cleans up my code a lot.

Here's my almost finished skin:
Applied the same trick to the volume bar :)
almostfinished.png
YoutubePlayer_1.0.rmskin
Yeah sorry for not showing up to help sooner, I guess my email replies somehow stopped coming through for this thread. Glad to see you got it working for you.
User avatar
StArL0rd84
Posts: 426
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by StArL0rd84 »

tjhrulz wrote:Yeah sorry for not showing up to help sooner, I guess my email replies somehow stopped coming through for this thread. Glad to see you got it working for you.
Yeah np. The notification system could use a tune up.
I get my email notifications late.
Tnx again for the amazing plugin.
But now that I have you here...
The plugin already boasts a ton of features, so maybe it's too much to ask, but I am making a playlist feature with web parser. Just seem sluggish. Maybe it's something you could incorporate into the plugin in stead. Like it would auto detect if I am playing a song from a playlist and show me the name of the playlist and list the songs in it. This way I could also auto hide the skip-back/previous button if it's not a song from a playlist.

Totally understand if you can't, I can see how it could be a nightmare to code :D
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
PinDev
Posts: 25
Joined: April 26th, 2015, 11:37 am
Location: Earth

Re: WebNowPlaying plugin. Supports sites like Youtube and Soundcloud

Post by PinDev »

Hi, today i just realized that the cover isn't working, even tho it's working perfectly before. I even checked with the downloadable skin in the first page but the cover also not working. Is it just me? :???: