Jump to content

Windows Media Player and COM - How?


skay_t

Recommended Posts

Hi guys,

 

I need to be able to play windows media files on a server to test validity of streaming URL's and whether the file actually plays.

 

This needs to be done serverside (so a check can be run nightly / hourly) so I thought I might use phps COM object to load the windows media player and use the exposed methods to do this.

 

Basically all I will need to do is:

check the address doesnt return a 404 etc (easy)

check the videos duration.

 

Can someone point me in the right direction to actually using the Windows Media Player with the COM object? I dont know where to find a list of available applications that can be exposed through the COM object, Ive tried a host of options to load the player:

 

$wmp = new COM("WMPlayer.OCX");

$wmp = new COM("WMPlayer.Application");

$wmp = new COM("mplayer2.application");

$wmp = new COM("x-mplayer2.Application");

 

etc with no luck

 

OR

 

suggest an alternative idea / method? If I cant do this easily I will write a c++ console app to do it but would like to keep it within php to allow easy maintenance / upgrades later on.

 

 

Link to comment
https://forums.phpfreaks.com/topic/45349-windows-media-player-and-com-how/
Share on other sites

I'm not sure you'd have much luck here really, its much more a com object question, php just provides the interface to that object. I know there used to be a tool available (i'm sure I got it from msdn) that would scan all your com objects and display a list of properties and methods, but that was a long time ago when I was still using windows.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.