It is currently April 24th, 2024, 1:27 am

[Solved] Media Player Skin always defaults to "stop" why?

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

[Solved] Media Player Skin always defaults to "stop" why?

Post by Mor3bane »

Hi, so I have a simple player - when it starts or the playlist changes, it always defaults to the "stop" image, even though the play/pause functions normally in either case...

What is wrong here:

Code: Select all

[MeterNext]
Meter=Image
ImageName=#@#advance.png
X=239
Y=143
W=35
H=35
Antialias=1
LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "Next"]

[MeterPause]
Meter=Image
ImageName=#@#play.png
X=219
Y=193
W=35
H=35
Antialias=1
LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "PlayPause"][!HideMeter MeterPause][!ShowMeter MeterPlay][!Redraw]
Hidden=1

[MeterPlay]
Meter=Image
ImageName=#@#stop.png
X=219
Y=193
W=35
H=35
Antialias=1
LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "PlayPause"][!HideMeter MeterPlay][!ShowMeter MeterPause][!Redraw]
MiddleMouseDownAction=[!CommandMeasure "MeasureTrack" "SetShuffle -1"]
Hidden=0
Last edited by Mor3bane on February 1st, 2017, 7:58 pm, edited 1 time in total.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Media Player Skin always defaults to "stop" why?

Post by CyberTheWorm »

Try taking out

Code: Select all

Hidden=0
I think that makes it always visible

Edit, nope I was wrong
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Skin always defaults to "stop" why?

Post by balala »

Mor3bane wrote:Hi, so I have a simple player - when it starts or the playlist changes, it always defaults to the "stop" image, even though the play/pause functions normally in either case...
I suppose not to stop (a such button, at least in the posted code, don't even exist), but the pause, isn't it?
You should post the used measures too, or even better the whole code. What is shown, usually depends on the used measures too. So, give us please, some more code.
And one more: the LeftMouseUpAction is usually preferred, instead of LeftMouseDownAction. Here you can find out why.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Media Player Skin always defaults to "stop" why?

Post by Mor3bane »

Hi guys,

I am not sure the mouse*action is in play here - as it is only valid after a mouse action.

@balala, here is the full code:

Code: Select all

[Rainmeter]
Author=Rebooted by Morbane
Update=100
MouseScrollDownAction=[!CommandMeasure "MeasureVolume" "ChangeVolume -#VolumeStep#"][!Update]
MouseScrollUpAction=[!CommandMeasure "MeasureVolume" "ChangeVolume +#VolumeStep#"][!Update]
MiddleMouseDownAction=[!CommandMeasure "MeasureVolume" "ToggleMute"]
Group=Big

[Metadata]
Name=Round Player
License=GNU Public License
Information=Morbane Update

[Variables]
@Include=#@#RoundVariables.inc
Color=#GlobalFontColor#
TextColor=#Color#
ColorZ=#ColorOffset#
PlayerName=#Player#
FirstCir=23,153,140
SecondCir=23,153,140
ProgressCir=85,215,202
VolumeStep=1

[MeasureVolume]
Measure=Plugin
Plugin=Win7AudioPlugin

[MeasureVolCalc]
Measure=Calc
Formula=MeasureVolume
MinValue=0
MaxValue=100
IfAboveValue=1
IfAboveAction=[!HideMeter MeterVolumeOff]
IfEqualValue=0
IfEqualAction=[!ShowMeter MeterVolumeOff]
IfBelowValue=0
IfBelowAction=[!ShowMeter MeterVolumeOff]

[ImageNumberCalc]
Measure=Calc
Formula=Counter%10
DynamicVariables=1

[MeasureBackground]
Meter=Image
ImageName=#@#Background
X=11
Y=12
W=258
H=257

[MainCover]
Meter=Image
MaskImageName=#@#mask.png
;ImageName="#@#warp\warp-[ImageNumberCalc].png"
AntiAlias=1
X=47
Y=47
W=187
H=187
DynamicVariables=1

[MeasureTrack]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#PlayerName#
PlayerType=Title
DisableLeadingZero=1
Substitute="":"stopped"

;------------------------------------------
[mDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureTrack]
PlayerType=DURATION

[mPosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureTrack]
PlayerType=POSITION

[mTime]
Meter=String
MeasureName=mPosition
MeasureName2=mDuration
X=140
Y=180
StringAlign=Center 
FontColor=#Color#
AntiAlias=1
FontSize=16
StringStyle=Bold
Text="%1/%2"
DynamicVariables=1

[mYear]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureTrack]
PlayerType=Year
Substitute="^0$":""
RegExpSubstitute=1

[mYearText]
Meter=String
MeasureName=mYear
X=140
Y=68
StringAlign=Center 
FontColor=#Color#
AntiAlias=1
FontSize=16
StringStyle=Bold
Text="%1"
DynamicVariables=1
;------------------------------------------

[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureTrack]
PlayerType=Artist
Substitute="":"no track"

[MeasureTime]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureTrack]
PlayerType=Position

[MeasureState]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureTrack]
PlayerType=State

[MeasureBar]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureTrack]
PlayerType=Progress

[MeasureCircle]
Measure=Calc
Formula=1

[MeterProgress]
Meter=RoundLine
MeasureName=MeasureBar
W=280
H=280
LineWidth=4
LineLength=98
LineStart=90
LineColor=#ProgressCir#
Solid=1
Antialias=1

[MeterCircle1]
Meter=Roundline
MeasureName=MeasureCircle
X=140
Y=140
LineWidth=4
LineLength=100
LineStart=96
LineColor=#FirstCir#
Solid=1
Antialias=1

[MeterCircle2]
Meter=Roundline
MeasureName=MeasureCircle
X=140
Y=140
LineWidth=4
LineLength=86
LineStart=84
LineColor=#SecondCir#
Solid=1
Antialias=1

[MeterTrack]
Meter=String
MeasureName=MeasureArtist
MeasureName2=MeasureTrack
Text="%1 - %2"
W=150
H=80
X=65
Y=100
ClipString=2
FontColor=#ColorZ#
FontSize=16
StringStyle=Bold
Antialias=1

[Back]
Meter=Image
MaskImageName=#@#mask.png
AntiAlias=1
Y=24
X=24
W=210
H=209
SolidColor=0,0,0,1
MouseLeaveAction=[!HideMeterGroup hide][!ShowMeter MainCover][!UpdateMeter *][!Redraw]
MouseOverAction=[!HideMeter MainCover][!ShowMeterGroup hide][!UpdateMeter *][!Redraw]
DynamicVariables=1

[MeterVolumeKnob]
Meter=Rotator
MeasureName=MeasureVolCalc
ImageName=#@#Knob.png
X=86
Y=86
W=106
H=106
OffsetX=115
OffsetY=115
StartAngle=4.1887902
RotationAngle=4.1887902
Group=hide
Hidden=1

[MeterVolumeOff]
Meter=Image
X=115
Y=115
ImageName=#@#VolOff.png
Hidden=1

[MeterPrevious]
Meter=Image
ImageName=#@#back.png
X=178
Y=227
W=35
H=35
Antialias=1
RightMouseDownAction=[!CommandMeasure "MeasureTrack" "Previous"]
LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "SetPosition 0"]

[MeterNext]
Meter=Image
ImageName=#@#advance.png
X=239
Y=143
W=35
H=35
Antialias=1
LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "Next"]

[MeterPause]
Meter=Image
ImageName=#@#play.png
X=219
Y=193
W=35
H=35
Antialias=1
LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "PlayPause"][!HideMeter MeterPause][!ShowMeter MeterPlay][!Redraw]
Hidden=1

[MeterPlay]
Meter=Image
ImageName=#@#stop.png
X=219
Y=193
W=35
H=35
Antialias=1
LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "PlayPause"][!HideMeter MeterPlay][!ShowMeter MeterPause][!Redraw]
MiddleMouseDownAction=[!CommandMeasure "MeasureTrack" "SetShuffle -1"]
Hidden=0
Last edited by Mor3bane on February 1st, 2017, 10:00 am, edited 1 time in total.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Media Player Skin always defaults to "stop" why?

Post by Mor3bane »

As a further, refreshing the meter in "play" mode corrects the issue e.g. when the music is playing.

Refreshing the meter in "stop" mode does not correct the anomaly.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Media Player Skin always defaults to "stop" why?

Post by CyberTheWorm »

Try changing to this

Code: Select all

[MeterPause]
......
Hidden=0

[MeterPlay]
.........
Hidden=1
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Skin always defaults to "stop" why?

Post by balala »

Mor3bane wrote:I am not sure the mouse*action is in play here - as it is only valid after a mouse action.
For sure it's not - I just saw your LeftMouseDownAction options and wanted to inform you why are they (at least usually) undesired. But using them won't cause such problems, for sure.
Mor3bane wrote:Hi, so I have a simple player - when it starts or the playlist changes, it always defaults to the "stop" image, even though the play/pause functions normally in either case...
To be honest I can't see what's the problem: when something is playing, the Stop button is visible, when it's paused or stopped, the Play button is visible (just mention that instead of the Stop, I'd use a Pause, but not this is the question). Just one single thing can I think to: I don't have the content of the RoundVariables.inc file, as well as I also don't have all used resources (like mask.png, Knob.png, and so on). So, please pack the whole config and upload it, to be sure I have everything as you have them.
And one question: are you sure the Update=100 is needed. In my opinion the default Update=1000 would be completely enough, a such frequent update is not needed.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Media Player Skin always defaults to "stop" why?

Post by eclectic-tech »

Mor3bane wrote:As a further, refreshing the meter in "play" mode corrects the issue e.g. when the music is playing.

Refreshing the meter in "stop" mode does not correct the anomaly.
Most players use separate 'Stop' and 'Play/Pause' controls... you seem to be trying to combine the 'Stop/Play' to do something other than what the player does, why?

You have the section [MeasureState], but are not using it in your code. This measure tells you the current state of the player and can be used to show the appropriate image for play/pause.

I would recommend adding Substitute="0":"Play","1":"Pause","2":"Play" to that measure.
Remove [MeterPause].
Then Modify your [MeterPlay] and add a new meter [MeterStop].

Like this:

Code: Select all

[MeasureState]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureTrack]
PlayerType=State
Substitute="0":"Play","1":"Pause","2":"Play"

...

; [MeterPause]
; Meter=Image
; ImageName=#@#pause.png
; X=219
; Y=193
; W=35
; H=35
; Antialias=1
; LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "PlayPause"][!HideMeter MeterPause][!ShowMeter MeterPlay][!Redraw]
; Hidden=1

[MeterPlay]
Meter=Image
ImageName=#@#[MeasureState].png
X=219
Y=193
W=35
H=35
Antialias=1
LeftMouseDownAction=[!CommandMeasure "MeasureTrack" "PlayPause"]
;[!HideMeter MeterPlay][!ShowMeter MeterPause][!Redraw]
MiddleMouseDownAction=[!CommandMeasure "MeasureTrack" "SetShuffle -1"]
Hidden=0
DynamicVariables=1

[MeterStop]
Meter=Image
ImageName=#@#stop.png
X=122
Y=241
W=35
H=35
Antialias=1
LeftMouseUpAction=[!CommandMeasure "MeasureTrack" "Stop"]
;[!HideMeter MeterPause][!ShowMeter MeterPlay][!Redraw]
MiddleMouseUpAction=[!CommandMeasure "MeasureTrack" "SetShuffle -1"]
Hidden=0
I attached an image for the 'pause.png'
pause.png
And it would look like this:
aaaa.png
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Skin always defaults to "stop" why?

Post by balala »

eclectic-tech wrote:Most players use separate 'Stop' and 'Play/Pause' controls... you seem to be trying to combine the 'Stop/Play' to do something other than what the player does, why?
No eclectic-tech, you're wrong here, I think. The incriminated button does plays or pauses, not stops the playback. The image of it is the only wrong, because indeed a Stop sign is used, instead of the Pause. That's why I said in my last post that
balala wrote:(just mention that instead of the Stop, I'd use a Pause
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Media Player Skin always defaults to "stop" why?

Post by eclectic-tech »

Wrong? ... I'm never wrong, just mistaken! ;-)

I simply was pointing out the same thing you did and created a pause image, then used his existing measure state, so he could make it work... most of the time, I don't even use stop button. :D

We are both saying the same thing, no matter how it is explained. :welcome: