Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Windows Media Player Plugin

Announcements of new plugins or updates.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

spauka
Posts: 21
Joined: June 23rd, 2009, 12:01 pm
Location: Sydney, Australia

Windows Media Player Plugin

Post by spauka »

Hi all,
After alot of thought, i didnt think i liked the idea of using proprietary software to show the currently playing media in Windows Media Player, so i thought i would write a plugin that didnt need additional software, or an external file, or additional configuration to work. Anyway, here is the result.

I kept the syntax the same as for wmpblog so that it is still compatible if anyone does want to change over.

The readme file has detailed instructions on the operation of the plugin

To install, unzip BOTH dll's into the plugin directory of LCDSmartie. Also, ensure you use all lower case letters when refencing the dll (i.e. $dll(wmpcom,1,1,1) as opposed to $dll(WmpCom,1,1,1) as it may cause problems with namespaces)

This library was compiled for the .NET Framework v3.0, however if anyone needs it, I can provide source code, or .NET version 2.0 binaries.
Hope it helps those of you who dont want a plugin installed in Windows Media Player. :D

The plugin now supports actions, i.e. Play Pause etc. A full list of supperted functions are listed in the included readme.txt.

Enjoy
You do not have the required permissions to view the files attached to this post.
Last edited by spauka on August 18th, 2009, 1:55 pm, edited 5 times in total.

usling
Posts: 38
Joined: September 5th, 2008, 1:55 pm

Post by usling »

nice, works pretty well! :)

Is it possible to make it work for web browser WMP plugin? i listen to radio a lot, and it uses WMP.

Like this: http://www.sr.se/webbradio/include/play ... st&Id=3075 Swedish radio, but you get the point. Atm it doesn't work with this player. But when i launch the regular player and play the same radio, it works.

edit: some concerns... it seems to be a bit sluggish at times when retreiving information from WMP. i will test it some more.

spauka
Posts: 21
Joined: June 23rd, 2009, 12:01 pm
Location: Sydney, Australia

Sluggishness and Radio

Post by spauka »

Hey,
Unfortunately, the way that im connecting to Windows Media Player using a COM Service means that, given the way that Windows Media player organises its instances, that it cannot connect to a session thats not being run by the main process. Although it is running Windows Media Player in your browser, it is a Local instance, to which the current COM services do not allow an external connection. This seperation can be highlighted by playing a file in the main player, as well as within the browser. They are counted as two seperate processes, with the difference being that the one in the browser is inaccessible from the outside.

As to the issue of sluggishness, I hadn't noticed this, however i am at the moment on Windows 7, so i will go test on XP, see if that gives me different results. So if you have any more info about when it is slugglish, I'd be glad to look into it.

usling
Posts: 38
Joined: September 5th, 2008, 1:55 pm

Post by usling »

Thank you for your detailed answer :)

I use Vista 32bit. The sluggishness can be a combination of other plugins to smartie, but it got a worse when i installed this plugin. All my plugins makes smartie a bit unstable, and it's especially this plugin, media player classic plugin, bsplayer plugin and nested combinations that causes issues. I will test it more before i can give you details.

It might not be your plugin's fault at all.

edit: maybe all these plugins uses the same service and are somewhat conflicting with each other. I guess i could remove most of them since i almost only use Media Player Classic for video and dvds.

DotA_Player
Posts: 57
Joined: February 23rd, 2008, 7:42 pm

Re: Windows Media Player Plugin

Post by DotA_Player »

Awesome, finally solution for users with Win2k3 (can't install Windows Media Player Blogging plugin), and provides so much values - Big up dude.

liamstears
Posts: 11
Joined: April 20th, 2008, 3:58 am

Re: Windows Media Player Plugin

Post by liamstears »

In my setup I need the functions to Play Pause Next etc so that I can add them as actions. Can you add these for me??

Thanks in advance

spauka
Posts: 21
Joined: June 23rd, 2009, 12:01 pm
Location: Sydney, Australia

Re: Windows Media Player Plugin

Post by spauka »

Actions are now supperted in the plugin. So now you can play pause etc from within LCDSmartie. Full instructions are included in the Readme.txt file.

liamstears
Posts: 11
Joined: April 20th, 2008, 3:58 am

Re: Windows Media Player Plugin

Post by liamstears »

Am i making a mistake here?

$dll(wmpcom.dll, 3, Play, 0)
$dll(wmpcom.dll, 3, Stop, 0)
etc...

they all work BUT

If $dll(buttons,1,0,0) = 110 Then $dll(wmpcom.dll, 3, Play, 0)

Doesn't work??????
110 is my button that works when setup to:

If $dll(buttons,1,0,0) = 110 Then WAPlay

liamstears
Posts: 11
Joined: April 20th, 2008, 3:58 am

Re: Windows Media Player Plugin

Post by liamstears »

I worked it out, instead of:

If $dll(buttons,1,0,0) = 110 Then $dll(wmpcom.dll, 3, Play, 0)

you have to put:

If $dll(buttons,1,0,0) = 110 Then wmpcom.dll, 3, Play, 0

liamstears
Posts: 11
Joined: April 20th, 2008, 3:58 am

Re: Windows Media Player Plugin

Post by liamstears »

Nope I was wrong.

You have to add both:

If $dll(buttons,1,0,0) = 110 Then $dll(wmpcom.dll, 3, Play, 0)

AND

If $dll(buttons,1,0,0) = 110 Then wmpcom.dll, 3, Play, 0

and then it works!!

spauka
Posts: 21
Joined: June 23rd, 2009, 12:01 pm
Location: Sydney, Australia

Re: Windows Media Player Plugin

Post by spauka »

Noted a couple of people were interested in the source code for plugins, so if anyone is interested, i've decided to post the source code for the Windows Media Player plugin. It is written in c#, and should compile in Visual Studio 2008. I have't been able to try on earler versions, or in the express editions, so i'd be interested to hear if it works.

JKouba
Posts: 2
Joined: September 4th, 2009, 6:35 am

Re: Windows Media Player Plugin

Post by JKouba »

Question... Will this work with WMP playing within MediaCenter? I'm running Vista 64bit Ultimate MediaCenter.

JKouba
Posts: 2
Joined: September 4th, 2009, 6:35 am

Re: Windows Media Player Plugin

Post by JKouba »

Actually, I just tested it with MediaCenter and it worked fine for music but not videos. It indicates nothing is playing. Does anyone know how to get it to recognize a video is playing and get data from it?

spauka
Posts: 21
Joined: June 23rd, 2009, 12:01 pm
Location: Sydney, Australia

Re: Windows Media Player Plugin

Post by spauka »

Unfortunately, this plugin will only work when playing music in Windows Media Center. When media center plays music it uses windows media player to do so, so if you open windows media player while playing music in media center, then you can observe the song being played through media player. However, given the increased complexity when playing movies, for example different sets of data particularly for DVD's and TV, this type of media is not connected through the main instance of media player. Hence, while this plugin will work for music, it wont for video's and movies etc.
Hope this answers your question, although a Wimdows media center plugin is on my agenda eventually...

antonakis
Posts: 36
Joined: October 31st, 2009, 10:36 am

Re: Windows Media Player Plugin

Post by antonakis »

I have a problem with this plugin

i write these
if $dll(wmpcom.dll,2,0,0) = 0 Then EnableScreen(17)
if $dll(wmpcom.dll,2,0,0) > 0 Then DisableScreen(17)
if $dll(wmpcom.dll,2,0,0) = 0 Then EnableScreen(13)

screen 17 is the media player's commands
screen 13 is my pc temperatures that i want to be shown, all the other time

The problem is that when media player starts,screen 17 is shown(OK till here)
when i pause media player,screen 13 is shown(OK tll here)
when i close media player , it does not return to screen 13, that i want

DotA_Player
Posts: 57
Joined: February 23rd, 2008, 7:42 pm

Re: Windows Media Player Plugin

Post by DotA_Player »

When media IS playing, you're ENABLING temp screen AND wmp screen at once. (wrong?)
When media is NOT playing, you're DISABLING wmp screen (right)

1. you have to disable temp screen sometime (you have to disable it when media is playing, if you don't do it, closing wmp wont make effect (because screen was already enabled) - more actions needed)


2. why don't you use "GotoScreen(#)" instead of enabling/disabling screens? You'd need only 2 actions:

Code: Select all

if $dll(wmpcom.dll,2,0,0) = 0 Then GotoScreen(17)
if $dll(wmpcom.dll,2,0,0) > 0 Then GotoScreen(13)

Regards

antonakis
Posts: 36
Joined: October 31st, 2009, 10:36 am

Re: Windows Media Player Plugin

Post by antonakis »

if $dll(wmpcom.dll,2,0,0) = 0 Then GotoScreen(17)
if $dll(wmpcom.dll,2,0,0) > 0 Then GotoScreen(13)

these lines does not work.I don't know why...
Must i check/unckeck somethimg from the "sticky" or the "enabled" in the screens menu??

i tried this..Still does not work...

if $dll(wmpcom.dll,2,0,0) = 0 Then DisableScreen(13)
if $dll(wmpcom.dll,2,0,0) = 0 Then EnableScreen(17)
if $dll(wmpcom.dll,2,0,0) > 0 Then DisableScreen(17)
if $dll(wmpcom.dll,2,0,0) > 0 Then EnableScreen(13)

When i close media player, LCD still shows the media player's info

DotA_Player
Posts: 57
Joined: February 23rd, 2008, 7:42 pm

Re: Windows Media Player Plugin

Post by DotA_Player »

These actions are right.

I found in ReadMe even an example
if $dll(wmpcom.dll,2,0,0) = 0 Then GotoScreen(2)
if $dll(wmpcom.dll,2,0,0) > 0 Then GotoScreen(1)

Try to put this to screen

$dll(wmpcom.dll,2,0,0)

And check what does it return on display when player is on/off/playing.

antonakis
Posts: 36
Joined: October 31st, 2009, 10:36 am

Re: Windows Media Player Plugin

Post by antonakis »

DotA_Player wrote: Try to put this to screen

$dll(wmpcom.dll,2,0,0)

And check what does it return on display when player is on/off/playing.

maybe here is the problem...
when media player is playing shows 0
when media player pause shows 2
when i close it still shows 0

what can we do now?

DotA_Player
Posts: 57
Joined: February 23rd, 2008, 7:42 pm

Re: Windows Media Player Plugin

Post by DotA_Player »

Yop, this is the problem.
$dll(wmpcom.dll,2,0,0) Returns 1 as it should for me ... I am using WMP10.

I belive you tried to restart computer - there's known bug with WMP that if you use panel on taskbar and explorer.exe falls, the player is still active when you press close (and playing if you didn't stop/pause).


You can add an action ussing process lister/checker, to check this:

If process.dll(function to check if wmplayer.exe is running) is > 0 then gotoscreen....

You may reffer to process.dll documentation for valid syntax.

antonakis
Posts: 36
Joined: October 31st, 2009, 10:36 am

Re: Windows Media Player Plugin

Post by antonakis »

i am using WMP11
I dont use explorer..

I wiil try the process.dll and i'll see..

DotA_Player
Posts: 57
Joined: February 23rd, 2008, 7:42 pm

Re: Windows Media Player Plugin

Post by DotA_Player »

I am not sure but I read sometime there's problem with WMP11.

explorer.exe = process, that Windows uses for explorer (folders), Internet Explorer (ver. 6 - I don't know how about others), but mainly, explorer.exe is process that takes care about taskbar and desktop icons. I think that all of us know the problem that taskbar and desktop icons just disappear for some time period... If this happens and WMP is on with taskbar toolbar, there's problem I mentioned.

Scripter1
Posts: 11
Joined: December 5th, 2009, 3:11 pm
Location: Poland
Contact:

Re: Windows Media Player Plugin

Post by Scripter1 »

antonakis wrote:When i close media player, LCD still shows the media player's info
There is big bug:
After first call of the plugin in LCD Smartie WMP process (wmplayer.exe) can't be closed.
WMP window disappears but process isn't closed, even after killing process it restarts.
The only way to be able to definitely close WMP (or kill it's process) is closing LCD Smartie and then close closing WMP (or kill process)...

Tested on WMP11.

MaD2ko0l
Posts: 15
Joined: June 14th, 2009, 11:36 pm

Re: Windows Media Player Plugin

Post by MaD2ko0l »

hi,

im running windows 7 ultimate 32bit and ihave tryed this pluggin as i woudl like to get the duration of music/films that im watching.

however, when i try to run it i get the following:

load of pluggin faild:: loadlibrary failed with #126: the specified module cannot be found

i have put the .dll's in the pluggins directory and i an using the correct commands.

any ideas???

thanks

MaD2ko0l
Posts: 15
Joined: June 14th, 2009, 11:36 pm

Re: Windows Media Player Plugin

Post by MaD2ko0l »

^^ BUMP ^^

Anyone?

Post Reply