Page 1 of 2
Windows Media Player Plugin
Posted: June 28th, 2009, 11:22 am
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.
The plugin now supports actions, i.e. Play Pause etc. A full list of supperted functions are listed in the included readme.txt.
Enjoy
Posted: June 30th, 2009, 10:41 pm
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.
Sluggishness and Radio
Posted: July 1st, 2009, 5:10 am
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.
Posted: July 1st, 2009, 9:18 pm
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.
Re: Windows Media Player Plugin
Posted: July 17th, 2009, 8:27 pm
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.
Re: Windows Media Player Plugin
Posted: August 7th, 2009, 10:37 pm
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
Re: Windows Media Player Plugin
Posted: August 8th, 2009, 4:18 am
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.
Re: Windows Media Player Plugin
Posted: August 8th, 2009, 10:50 am
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
Re: Windows Media Player Plugin
Posted: August 8th, 2009, 10:56 am
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
Re: Windows Media Player Plugin
Posted: August 8th, 2009, 11:02 am
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!!
Re: Windows Media Player Plugin
Posted: August 18th, 2009, 1:54 pm
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.
Re: Windows Media Player Plugin
Posted: September 5th, 2009, 11:22 pm
by JKouba
Question... Will this work with WMP playing within MediaCenter? I'm running Vista 64bit Ultimate MediaCenter.
Re: Windows Media Player Plugin
Posted: September 6th, 2009, 1:17 am
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?
Re: Windows Media Player Plugin
Posted: September 6th, 2009, 2:09 am
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...
Re: Windows Media Player Plugin
Posted: November 13th, 2009, 5:06 pm
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
Re: Windows Media Player Plugin
Posted: November 14th, 2009, 12:21 pm
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
Re: Windows Media Player Plugin
Posted: November 14th, 2009, 3:51 pm
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
Re: Windows Media Player Plugin
Posted: November 14th, 2009, 4:51 pm
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.
Re: Windows Media Player Plugin
Posted: November 14th, 2009, 6:57 pm
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?
Re: Windows Media Player Plugin
Posted: November 14th, 2009, 10:17 pm
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.
Re: Windows Media Player Plugin
Posted: November 15th, 2009, 2:47 pm
by antonakis
i am using WMP11
I dont use explorer..
I wiil try the process.dll and i'll see..
Re: Windows Media Player Plugin
Posted: November 15th, 2009, 8:43 pm
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.
Re: Windows Media Player Plugin
Posted: December 13th, 2009, 5:32 pm
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.
Re: Windows Media Player Plugin
Posted: May 20th, 2010, 8:00 pm
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
Re: Windows Media Player Plugin
Posted: May 27th, 2010, 12:26 pm
by MaD2ko0l
^^ BUMP ^^
Anyone?