It is currently April 19th, 2024, 3:35 am

Media Player Plugin

Share and get help with Plugins and Addons
i2002
Posts: 24
Joined: December 6th, 2021, 10:07 am

Re: Media Player Plugin

Post by i2002 »

balala wrote: December 13th, 2021, 7:02 pm This is what I do:
  • Activate the skin (Skins\MediaPlayer\MediaPlayer.ini). Both Groove Music and YouTube are closed.
  • Launching any of the above two players (Groove or YouTube in Edge).
  • The skin doesn't show the proper information. In order to get this, I have to refresh the skin.
Hi, sorry for late reply.
Unfortunately, if I take the same steps it updates automatically for me. I really don't understand why it wouldn't update the info for you.
The things that could happen are it would either crash (and you would see an error in Rainmeter) or hang and Rainmeter would become unresponsive (because it waits for the plugin to provide the updated info, but the plugin doesn't respond).
But the fact that right click and refresh works means that the plugin "works" as intended, but windows API gives wrong info.

We can test this with the modified plugin attached below, which shows debug info about the update cycles. It should cycle (at approximatively 1 second) between 1 and 2 when idle, 5 and 6 when media active and 3 and 4 when errors caught.
tmp_debug.png
If it doesn't change it means that there is something with Rainmeter that prevents updating.
if it cycles only between 1 and 2 even if there is a player active it means that the windows api gives wrong data for some reason or another.

Also, I'm assuming you have:
a fairly recent windows 10 version (you can see that in settings -> system -> about) (I have 21H1, but the api was added in 1809, so any version higher than that should be ok) (also idk if the api should behave differently in pro versions, I can't test this),
recent rainmeter version (I have 4.5.7),
vc++ runtime higher than 14.20 (in settings -> apps and features).
tmp_debut2.png
It really bugs me why it doesn't work but it also doesn't crash.
You do not have the required permissions to view the files attached to this post.
i2002
Posts: 24
Joined: December 6th, 2021, 10:07 am

Re: Media Player Plugin

Post by i2002 »

ikarus1969 wrote: December 13th, 2021, 3:58 pm I tried Youtube and it works! So it depends on the program if it supports that Windows-api. Chrome does it obviously. WMP and VLC not (yet?). So if i want to use your plugin, i had to find a compatible player. I'm happy i got it working in some sense now - thank you all for your hints and help!
Glad it worked.
So I guess initially the problem was with the runtime libraries (the error 126), but then just the fact that WMP doesn't support the win api.
I was also surprised when I discovered that VLC doesn't support the api. Maybe it's something you can enable in vlc settings, I don't know. WMP obviously can't work, because it's software from Windows 7 and they don't have any reason to update it to support win 10 apis.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Plugin

Post by balala »

i2002 wrote: December 18th, 2021, 10:35 am Unfortunately, if I take the same steps it updates automatically for me. I really don't understand why it wouldn't update the info for you.
Now it does for me as well. MY BAD: used not the latest Rainmeter. I realized this only when I read your reply. Accordingly when I updated Rainmeter, the plugin and the skin instantly started to work as expected.
Sorry, this was my fault. Again! This is not the first and I hope nor the last case I make this extremely stupid mistake.
Apologize I confused you. Entirely my bad.

Thank you for the plugin. Now that it does work well, it proves to be extremely useful for me. As said, it is the only plugin which can work with the new Groove Music of Win 10.
i2002
Posts: 24
Joined: December 6th, 2021, 10:07 am

Re: Media Player Plugin

Post by i2002 »

balala wrote: December 18th, 2021, 7:17 pm Now it does for me as well. MY BAD: used not the latest Rainmeter. I realized this only when I read your reply. Accordingly when I updated Rainmeter, the plugin and the skin instantly started to work as expected.
Sorry, this was my fault. Again! This is not the first and I hope nor the last case I make this extremely stupid mistake.
Apologize I confused you. Entirely my bad.

Thank you for the plugin. Now that it does work well, it proves to be extremely useful for me. As said, it is the only plugin which can work with the new Groove Music of Win 10.
Yeey, I'm glad that it finally works for you and now you can use it with Groove.
Don't worry, mismatch between versions of dependencies seems to be a fairly common compatibility problem.
This turned out to be a great learning experience for me, so I thank you for having patience while debugging this problem together. :thumbup:
I thought that it shouldn't matter if you have a bit older Rainmeter versions, but it seems it does.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Plugin

Post by balala »

i2002 wrote: December 19th, 2021, 10:07 pm Don't worry, mismatch between versions of dependencies seems to be a fairly common compatibility problem.
I have such problems extremely rarely. However did have a few times in past.
i2002 wrote: December 19th, 2021, 10:07 pm This turned out to be a great learning experience for me, so I thank you for having patience while debugging this problem together. :thumbup:
I thank you for assisted my in debugging. Much appreciated.
i2002 wrote: December 19th, 2021, 10:07 pm I thought that it shouldn't matter if you have a bit older Rainmeter versions, but it seems it does.
This time it did matter indeed.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Plugin

Post by balala »

One question related to this plugin, which is extremely useful with the Music Groove app of Windows 10. The plugin does work properly, excepting a few PlayerType options. The not working ones are these: PlayerType=Progress and PlayerType=Position.
Can these option to be get working?
Example code, just in case:

Code: Select all

[MeasurePlayer]
Measure=Plugin
Plugin=MediaPlayer
PlayerType=Title
Group=PlayerProp

[MeasureArtist]
Measure=Plugin
Plugin=MediaPlayer
PlayerType=Artist
Group=PlayerProp

[MeasureProgress]
Measure=Plugin
Plugin=MediaPlayer
PlayerType=Progress
Group=PlayerProp

[MeasurePosition]
Measure=Plugin
Plugin=MediaPlayer
PlayerType=Position
Group=PlayerProp

[MeterInfo]
Meter=STRING
MeasureName=MeasurePlayer
MeasureName2=MeasureArtist
MeasureName3=MeasureProgress
MeasureName4=MeasurePosition
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=10
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
StringCase=Proper
Text=Title: %1#CRLF#Artist: %2#CRLF#Position: %3#CRLF#Progress: %4
DynamicVariables=1
Thanks in advance for any help.
i2002
Posts: 24
Joined: December 6th, 2021, 10:07 am

Re: Media Player Plugin

Post by i2002 »

balala wrote: September 1st, 2022, 7:29 pm One question related to this plugin, which is extremely useful with the Music Groove app of Windows 10. The plugin does work properly, excepting a few PlayerType options. The not working ones are these: PlayerType=Progress and PlayerType=Position.
Can these option to be get working?
Example code, just in case:

Code: Select all

[MeasurePlayer]
Measure=Plugin
Plugin=MediaPlayer
PlayerType=Title
Group=PlayerProp

[MeasureArtist]
Measure=Plugin
Plugin=MediaPlayer
PlayerType=Artist
Group=PlayerProp

[MeasureProgress]
Measure=Plugin
Plugin=MediaPlayer
PlayerType=Progress
Group=PlayerProp

[MeasurePosition]
Measure=Plugin
Plugin=MediaPlayer
PlayerType=Position
Group=PlayerProp

[MeterInfo]
Meter=STRING
MeasureName=MeasurePlayer
MeasureName2=MeasureArtist
MeasureName3=MeasureProgress
MeasureName4=MeasurePosition
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=10
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
StringCase=Proper
Text=Title: %1#CRLF#Artist: %2#CRLF#Position: %3#CRLF#Progress: %4
DynamicVariables=1
Thanks in advance for any help.
HI, sorry for late reply.
This plugin just takes the options that the Windows API gives. It's up to the music player to give correct values.
It seems that Groove doesn't give playback progress information. In Spotify for example it works as intended (although the values are not updated every second so the progress bar jumps a bit).
Therefore I don't know how to help you.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Media Player Plugin

Post by balala »

i2002 wrote: September 11th, 2022, 11:17 am This plugin just takes the options that the Windows API gives. It's up to the music player to give correct values.
It seems that Groove doesn't give playback progress information.
Ok, thanks for the details. Don't worry, at least the title and artist are shown correctly, as well as the play / pause do work correctly.
I tried to find a plugin which can work with Groove, since I first time used it few years ago, but didn't find one, before this, so thank you for your work.
sarsticus
Posts: 1
Joined: October 28th, 2022, 9:24 pm

Re: Media Player Plugin

Post by sarsticus »

i2002 wrote: December 18th, 2021, 10:35 am Hi, sorry for late reply.
Unfortunately, if I take the same steps it updates automatically for me. I really don't understand why it wouldn't update the info for you.
The things that could happen are it would either crash (and you would see an error in Rainmeter) or hang and Rainmeter would become unresponsive (because it waits for the plugin to provide the updated info, but the plugin doesn't respond).
But the fact that right click and refresh works means that the plugin "works" as intended, but windows API gives wrong info.

We can test this with the modified plugin attached below, which shows debug info about the update cycles. It should cycle (at approximatively 1 second) between 1 and 2 when idle, 5 and 6 when media active and 3 and 4 when errors caught.

tmp_debug.png

If it doesn't change it means that there is something with Rainmeter that prevents updating.
if it cycles only between 1 and 2 even if there is a player active it means that the windows api gives wrong data for some reason or another.

Also, I'm assuming you have:
a fairly recent windows 10 version (you can see that in settings -> system -> about) (I have 21H1, but the api was added in 1809, so any version higher than that should be ok) (also idk if the api should behave differently in pro versions, I can't test this),
recent rainmeter version (I have 4.5.7),
vc++ runtime higher than 14.20 (in settings -> apps and features).

tmp_debut2.png

It really bugs me why it doesn't work but it also doesn't crash.
I have installed this skin a couple days ago, and have this issue.
The issue being that I need to refresh the skin after I've started playing media for it to register the media

I am on windows 10 Home 21H2
Rainmeter 4.5.16.3687
vc++ runtime 14.31.31103

I tried installing the debug version, and when the skin is started it cycles between 1 and 2, and keeps doing that even with media playing until I refresh, at which point it updates and cycles between 5 and 6.

If I then close the player application down, whether that is a browser, Groove music, or Cider, it starts cycling between 3 and 4 instead.

And the log shows this error on every update

Code: Select all

WARN (23:52:10.191) MediaPlayer_debug\MediaPlayer.ini - [mUpdateTick]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
WARN (23:52:10.192) MediaPlayer_debug\MediaPlayer.ini - [mTitle]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
WARN (23:52:10.193) MediaPlayer_debug\MediaPlayer.ini - [mArtist]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
WARN (23:52:10.193) MediaPlayer_debug\MediaPlayer.ini - [mAlbum]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
WARN (23:52:10.194) MediaPlayer_debug\MediaPlayer.ini - [mCover]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
WARN (23:52:10.195) MediaPlayer_debug\MediaPlayer.ini - [mProgress]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
WARN (23:52:10.195) MediaPlayer_debug\MediaPlayer.ini - [mPosition]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
WARN (23:52:10.196) MediaPlayer_debug\MediaPlayer.ini - [mDuration]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
WARN (23:52:10.197) MediaPlayer_debug\MediaPlayer.ini - [mState]: [MediaPlayer.dll] Get media properties failed: The RPC server is unavailable.
and it keeps this cycle going even if I open the player again and start playing media. Until I refresh the skin.
it looks like the skin has issues grabbing media properties if it is opened before any player

And if I have two players open, say youtube in a browser, and groove music, and Youtube is running and being captured by the skin.
If I then start groove music before closing youtube, and then closing the browser down, the plugin also stops working until I refresh.
This happens regardless which two players I switch between
Tezz95
Posts: 19
Joined: April 18th, 2023, 1:55 pm

Re: Media Player Plugin

Post by Tezz95 »

I think Cover Image scaling is not accurate.
Widget.png
Just check this cover image in Windows 11 Widget and now check this Media Player Cover Image.
MediaPlayer.png
You can easily identify that the Media Player's Cover Image is little zoomed.

Another Example
Windows11
Screenshot 2023-04-29 172143.png
Media Player
Screenshot 2023-04-29 172153.png
Hope Dev will fix this soon. Thank you.
You do not have the required permissions to view the files attached to this post.