WPF MediaPlayer doesn't play M4A?

Posted by Nick on Stack Overflow See other posts from Stack Overflow or by Nick
Published on 2010-03-29T00:00:06Z Indexed on 2010/03/29 0:03 UTC
Read the original article Hit count: 576

Filed under:
|
|
|
|

I am trying to use a MediaPlayer instance to play M4A files. For those of you that aren't familiar, MediaPlayer is the non-XAML version of a MediaElement. There are pretty much the same, but I don't want any XAML, so I use a MediaPlayer instead. Anyways, it plays some M4A files just fine. The NaturalDuration of other M4A files is 0, but it still plays. The remaining files don't play at all and the exception thrown is "Media file download failed." Playing all these songs using Windows Media Player works perfectly. Isn't the MediaPlayer and MediaElement classes built upon the same framework as WMP? I'm confused as to why it isn't working. Any help is greatly appreciated.

Thanks, Nick

© Stack Overflow or respective owner

Related posts about wpf

Related posts about mediaplayer