f4bzen
f4bzen

Reputation: 301

C# - Error if Windows Media Player is not supported

i´m using the windows media player (Interop.WMPLib.dll & AxInterop.WMPLib.dll) in my c#-project to stream a mp3 from a server. The only problem is, if the windows media player is somehow not supported on a pc (not installed or something), my application just gives an error (no exception, just a "windows-error") and won´t start.

So, is it possible to check, if the windows media player is supported? Just checking if the OS is supported will probably not help.

Are there maybe some better ways to stream mp3s than with the WMP ?

Thanks in advance.

Upvotes: 1

Views: 1714

Answers (2)

Jaroslav Kadlec
Jaroslav Kadlec

Reputation: 2543

I would like to extend this question one leve higher and solve absence of media player programatically because its unnecessary part of my solution. If interested please check https://stackoverflow.com/questions/17103532/optional-use-of-embed-wmp-on-windows-server

Upvotes: 0

Pit Digger
Pit Digger

Reputation: 9800

Look at the IsInstalled value under key HKLM\Software\Microsoft\Active Setup\Installed Components\{22d6f312-b0f6-11d0-94ab-0080c74c7e95} OR HKLM\Software\Microsoft\MediaPlayer\ . It is 1 if installed .

OR Try a thirdparty player if you dont want to rely on WMP . VLC also has support for so many codecs .

http://wiki.videolan.org/.Net_Interface_to_VLC
http://vlcdotnet.codeplex.com/
http://www.codeproject.com/Articles/109639/nVLC
http://sourceforge.net/projects/libvlcnet/

Upvotes: 1

Related Questions