It is currently May 18th, 2024, 9:35 pm

Issue with music progress bar.

Get help with creating, editing & fixing problems with skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5411
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Issue with music progress bar.

Post by eclectic-tech »

Yincognito wrote: June 26th, 2023, 1:24 pm This will help for sure in the case of the updated Mond skin, but doesn't explain the similar behavior in the Blurry Music Player linked above, where setting the position via click is much more straightforward:

Code: Select all

[MeterBar]
Meter=Shape
X=(25*#Scale#)
Y=(122*#Scale#)
Shape=Rectangle 0,0,(76*#Scale#),(1*#Scale#),0 | Fill Color 0,0,0,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*0.75*#Scale#),(1*#Scale#),0 | Fill Color 0,0,0 | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*0.75*#Scale#),(0.8*#Scale#),(4*#Scale#) |Fill Color 0,0,0 | StrokeWidth 0
Shape4=Rectangle 0,(-1*#Scale#),(76*#Scale#),(3*#Scale#),0 | Fill Color 0,0,0,1 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]
Unless it's related to the scaling formulas, but then it should fail for any player and plugin, not just Spotify and WebNowPlaying... :confused:
I do not have the issue with that skin, I can click at the end and it progresses to that position (it does not start over).
However, even though the position application is more direct, the progress display is a bit erratic; while sound is playing it jumps back and forth and at the end of songs the circular progress gets weird. those are not issues I want to correct. :uhuh:

Click to animate...
blurry.gif
You do not have the required permissions to view the files attached to this post.
User avatar
RoseRain
Posts: 42
Joined: June 30th, 2022, 1:39 pm

Re: Issue with music progress bar.

Post by RoseRain »

Yincognito wrote: June 26th, 2023, 1:02 pm I see. Can you post the edited code, just to see if there isn't something there that could cause the issue? :???:
I just changed everything that was "NowPlaying" to "WebNowPlaying". Should some remain as NowPlaying? (I apologise for my lack of knowledge with rainmeter codes.) The rest of the skin I left as is.

Code: Select all

[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""

[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=TITLE
Substitue="":""

[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=PROGRESS

[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=DURATION

[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=POSITION

[MeasureCover]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=COVER

[MeasureStateButton]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"


[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=SHUFFLE
Substitute="0":"#@#ShuffleOFF.png","1":"#@#ShuffleON.png"

[MeasureRepeat]
Measure=Plugin
Plugin=WebNowPlaying.dll
PlayerName=#Player#
PlayerType=REPEAT
Substitute="0":"#@#RepeatOFF.png","1":"#@#RepeatON.png"
User avatar
RoseRain
Posts: 42
Joined: June 30th, 2022, 1:39 pm

Re: Issue with music progress bar.

Post by RoseRain »

eclectic-tech wrote: June 26th, 2023, 1:04 pm I use the Player.ini skin from the updated Mondtholomew package and it has the same issue when trying to click beyond ~80% of the progress.
The problem is an error in the code that determines the position of the mouse cursor over the progress bar.
To correct, you need to edit the 'Measures.inc' file in the Player folder by changing the Formula as shown:

Code: Select all

[MeasureSeekPercentage]
Measure=Calc
Formula=(Clamp((#MouseX# - [MeterSeek:X] - #SeekBarPadding#) / Max([BarMaxWidth],1),0,1) * 100)
MinValue=0
MaxValue=100
DynamicVariables=1
This returns the correct percentage for the mouse position in relation to the progress bar's actual width by using [BarMaxWidth] instead of the meter width in the formula.

Hope this helps :)
I changed it in the Measures.inc in the player folder of the updated Mondtholomew skin and sadly, it did not help. It still does it. (Plays the song for beginning again when clicking over 3 and a half min of the song. Kinda, behaves like a previous track button would.
User avatar
xenium
Posts: 871
Joined: January 4th, 2018, 9:52 pm

Re: Issue with music progress bar.

Post by xenium »

RoseRain wrote: June 26th, 2023, 2:37 am Hey everyone!

Just need a little advice.
I have been searching for a clickable and possibly draggable progress bar for music.

I did not find a draggable one yet, so I decided to use the clickable ones such as Mond for now until I can try to learn how to make one, do some research on it.

With Mond, and other clickable progress bars....
I have noticed an issue with it... it only lets me click about 3 min and 34 seconds into the song and if I click further down the bar, the song restarts from the beginning and the progress goes back to the beginning. I can click anywhere within the bar if it doesn't exceed 3:34 min and it works. But soon as I go over that, the bar goes back and so does the song, so I can't click further.
Clicking back on the bar, is ok, its clicking ahead that isn't.

I have tried it with other skins too besides Mond, And exactly the same thing happens... (All this is using Spotify)

(I did try with Windows Media Player just to see if it was maybe an issue with Spotify, but WMP was even worse)

Does anyone have any idea why this might be happening? Maybe a setting I need to change? or is this supposed to be like this?

Thanks in advance for any advice on this.
I also tested the Mond player , Bllury player and my player with Spotify and this behavior is a issue of the WebNowPlaying plugin version 2.0.3 and the latest version 2.0.4.
Works OK with WebNowPlaying 1.2.0 + Spicetify
User avatar
Yincognito
Rainmeter Sage
Posts: 7283
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Issue with music progress bar.

Post by Yincognito »

RoseRain wrote: June 26th, 2023, 2:33 pm I just changed everything that was "NowPlaying" to "WebNowPlaying". Should some remain as NowPlaying? (I apologise for my lack of knowledge with rainmeter codes.) The rest of the skin I left as is.
Xenium already offered a reasonable explanation for the behavior, but just for the record, I did what you did and since all players I had and tested weren't supported by WebNowPlaying (Winamp, GrooveMusic, WMP, PotPlayer, MPC-HC, Quicktime Player, etc.), I installed the browser extension with Use Native APIs both enabled and disabled, and didn't experience the issue. So, while this may be present on the 2.0.3+ versions of the plugin as xenium pointed out, it appears that only Spotify is affected (if the checkbox in the browser extension works by simulating getting data from a desktop-like app, that is; don't know if xenium tested other players to see if the issue appears there too).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7283
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Issue with music progress bar.

Post by Yincognito »

eclectic-tech wrote: June 26th, 2023, 2:27 pm I do not have the issue with that skin, I can click at the end and it progresses to that position (it does not start over).
However, even though the position application is more direct, the progress display is a bit erratic; while sound is playing it jumps back and forth and at the end of songs the circular progress gets weird. those are not issues I want to correct. :uhuh:
Yep, precisely my point: if everything worked fine (as mentioned by xenium), the issue should not be present in the blurry skin. No point in correcting such glitches, considering that you have no guarantee someone will use the corrected version. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7283
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Issue with music progress bar.

Post by Yincognito »

xenium wrote: June 26th, 2023, 3:27 pmthis behavior is a issue of the WebNowPlaying plugin version 2.0.3 and the latest version 2.0.4.
Maybe a side effect of the positioning estimation by the plugin. Might worth posting this as an issue on the plugin's GitHub page, if by any chance keifufu / tjhrulz aren't aware of the problem (did see the former visiting the forum, but not sure if he read this specific thread). :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16238
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Issue with music progress bar.

Post by balala »

RoseRain wrote: June 26th, 2023, 12:35 pm I did edit it, and added WebNowPlaying. The timer and progress is fine... its just that issue. I can't click past 3:34min without it going back to the beginning and restarting the song.

When I use the skin as is, unedited, using NowPlaying... with Windows Media Player (Just tried it again now) it works fine.

So its only happening with Spotify and WebNowPlaying.
Could you finally post a code, please, without it no one will be able to help you?
User avatar
xenium
Posts: 871
Joined: January 4th, 2018, 9:52 pm

Re: Issue with music progress bar.

Post by xenium »

Yincognito wrote: June 26th, 2023, 4:04 pm Maybe a side effect of the positioning estimation by the plugin. Might worth posting this as an issue on the plugin's GitHub page, if by any chance keifufu / tjhrulz aren't aware of the problem (did see the former visiting the forum, but not sure if he read this specific thread). :confused:
I mentioned this issue in the WebNowPlaying thread.
I've seen keifufu respond when plugin issues are reported.
User avatar
Yincognito
Rainmeter Sage
Posts: 7283
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Issue with music progress bar.

Post by Yincognito »

xenium wrote: June 26th, 2023, 4:41 pm I mentioned this issue in the WebNowPlaying thread.
I've seen keifufu respond when plugin issues are reported.
Excellent - hopefully he'll be able to find a solution to this. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth