It is currently October 3rd, 2024, 2:20 pm

NowPlaying plugin - Multiple Media Player Support

Share and get help with Plugins and Addons
poiru
Developer
Posts: 2873
Joined: April 17th, 2009, 12:18 pm

VLC support now official!

Post by poiru »

NowPlaying now officially supports VLC in the latest beta. Download the libcad plugin for VLC and use PlayerName=CAD in the skin :)
User avatar
Waldensamkeit
Posts: 83
Joined: March 15th, 2011, 12:39 pm
Location: Hamilton, New Jersey

Re: NowPlaying plugin - Multiple Media Player Support

Post by Waldensamkeit »

I'm trying to play with the mStateButton measure but rather than using the webdings font to have text "buttons" that would easily change from play to pause, I had to be a pain in the ass and actually create a button image for each function; play, pause, next, etc.

Now it was easy enough to create a separate play and pause button that switch back and forth using "...hide/showmeter" bangs/mouse click actions. But, I would really prefer if the button automatically "knew" which state it was in. I was hoping it would be as easy as modifying the substitute

Code: Select all

[mStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=STATE
Substitute="0":"PlayBTN.png","1":"PauseBTN.png","2":"PlayBTN.png" <<-------

...

[MeterPlay]
Meter=Button
MeasureName=mStateButton
ButtonImage="#BTNpath#%1" <<---------
X=103
Y=r
ButtonCommand=!Execute [!RainmeterPluginBang "mPlayer Play"]

(The arrows were only inserted for the purposes of this post, they don't exist in the skin)
Unfortunately that just made my buttons disappear using it like this. While the ...hide/showmeter does work, if the skin is refreshed it no longer show the correct button, unless I click on play again, which restarts the song as well.

I imagine,
ifabove...
ifequal...
would most likely accomplish what I am shooting for and I really feel like it should be easy enough to do, but my ridiculous lack of sleep and inability to wrap my head around calcs is making this take days longer than it should have.

I'd really appreciate some guidance/assistance, help of any kind on this one.
Thanks
User avatar
Mordasius
Posts: 1178
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: NowPlaying plugin - Multiple Media Player Support

Post by Mordasius »

Waldensamkeit wrote: Unfortunately that just made my buttons disappear using it like this. While the ...hide/showmeter does work, if the skin is refreshed it no longer show the correct button, unless I click on play again, which restarts the song as well.
The following seems to work - it comes from poiru's soita skin

Code: Select all

[mStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=STATE
Substitute="0":"Play.png","1":"Pause.png","2":"Play.png"

...

[PauseOrPlay]
Meter=BUTTON
  ButtonImage=[mStateButton]
  X=24r
  Y=#ButtonY#
  LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer PlayPause"]
  DynamicVariables=1
  

It won't work unless you include the DynamicVariables=1
User avatar
Waldensamkeit
Posts: 83
Joined: March 15th, 2011, 12:39 pm
Location: Hamilton, New Jersey

Re: NowPlaying plugin - Multiple Media Player Support

Post by Waldensamkeit »

Mordasius wrote:It won't work unless you include the DynamicVariables=1
D'OH!! Figures I'd miss that. Thanks!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Kaelri »

I'm using r850, and "PlayPause" appears to be broken when used with MusicBee (both on 1.2.4176 and 1.2.4201). Rainmeter logs the following error:

Code: Select all

WARNING: (04:08:28.142) NowPlayingPlugin: PlayerType= in section [MeasureMediaPlayer] is not valid.
It works fine with VLC (which also uses the CAD interface), so the problem seems to be specific to MusicBee.

For whatever it's worth, MediaKey.dll also still works fine.
poiru
Developer
Posts: 2873
Joined: April 17th, 2009, 12:18 pm

Re: NowPlaying plugin - Multiple Media Player Support

Post by poiru »

Kaelri wrote:I'm using r850, and "PlayPause" appears to be broken when used with MusicBee (both on 1.2.4176 and 1.2.4201). Rainmeter logs the following error:
Are you using PlayerName=CAD (not PlayerName=MusicBee)?

The PlayPause bug will hopefully be fixed in time for MusicBee 1.2 final. If not, I'll do deal with it internally.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: NowPlaying plugin - Multiple Media Player Support

Post by Kaelri »

poiru wrote:Are you using PlayerName=CAD (not PlayerName=MusicBee)?
Yes. The rest of the bangs and PlayerTypes appear to be working fine, it's only Play, Pause and PlayPause that are affected.
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: NowPlaying plugin - Multiple Media Player Support

Post by ~Faradey~ »

Is this possible to make plugin works with VLC when listen to radio, i mean to show track at least? and if yes, is it possible to make it for portable VLC too?

It would be great in making radio skins (for example my Anime Radio, would lose a big amount of code in case above will be possible) :)
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: NowPlaying plugin - Multiple Media Player Support

Post by Seahorse »

poiru wrote: Yes. You would need to create 'hit zones' (e.g. one for 5%, 10%, 15%, etc.).
Working on Cobolt 2 and I've been tinkering away with this problem for two days having solved all the parts I consider "complicated bits" on other changes, but have fallen over on a simple part duplicating the code of my Windows volume meter which works perfectly in another skin from this suite.

I'm am duplicating the method I used with a volume bar that works fine where you place a series of image blocks that display nothing to increment the level, the combined H & W of the blocks = the total dimensions of the progress bar effectively placing an invisible grid over the meter which you click and the !bang then sets the level. This should, using the same syntax that the volume meter, work with the songs progress bar allowing you to "jump" up and down a track. Sadly, not working at present using:

Code: Select all

[MeterProgressJump5]
Meter=Image
X=r
Y=r
H=20
W=10
LeftMouseUpAction=!PluginBang "MainMeasure SetPosition 5"

[MeterProgressJump10]
Meter=Image
X=10r
Y=r
H=20
W=10
LeftMouseUpAction=!PluginBang "MainMeasure SetPosition 10"

etc...
Looking at the NowPlaying volume examples which have Execute! and [] which I understand to be required if there is more than one !Bang, which I don't, anyhow I also tested with:

Code: Select all

[MeterProgressJump5]
Meter=Image
X=r
Y=r
H=20
W=10
LeftMouseUpAction=!Execute [!PluginBang "MainMeasure SetPosition 5"]

[MeterProgressJump10]
Meter=Image
X=10r
Y=r
H=20
W=10
LeftMouseUpAction=!Execute [!PluginBang "MainMeasure SetPosition 10"]

etc...
The ProgressJump meters come after the progress bar background and the progress bar meters, so they are "on top" as it were and as I understand it, should work with either version listed above. Clicking has no effect, but the mouse cursor DOES change from an arrow to the pointing finger when over the progress bar confirming it is in the right place.
Last edited by Seahorse on July 10th, 2011, 8:23 am, edited 1 time in total.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

poiru
Developer
Posts: 2873
Joined: April 17th, 2009, 12:18 pm

Re: NowPlaying plugin - Multiple Media Player Support

Post by poiru »

Seahorse wrote:The ProgressJump meters come after the progress bar background and the progress bar meters, so they are "on top" as it were and as I understand it, should work with either version listed above. Clicking has no effect, but the mouse cursor DOES change from an arrow to the pointing finger when over the progress bar confirming its in the right place.
IIRC, you are using Winamp, right? Just tested and works fine here. Care to upload the entirety of your code?
~Faradey~ wrote:Is this possible to make plugin works with VLC when listen to radio, i mean to show track at least? and if yes, is it possible to make it for portable VLC too?

It would be great in making radio skins (for example my Anime Radio, would lose a big amount of code in case above will be possible) :)
I'll see what I can do. NowPlaying/libcad_plugin.dll work fine with VLC Portable (from PortableApps.com). You need to copy the libcad plugin into VLCPortable\App\vlc\plugins and follow the instructions to activate it. Or doesn't this work for you?