开发者

Any simple way of playing media files in .NET?

are there any ways to play media files inside a WinForms application without having to struggle with VLC controls or similar?

What I'd like to do is to open movies or audio files inside, say a panel, and then be able to pause, resume and stop the playback.

The only way of doing that (as I've found) is to embed VLC inside my applications, which is quite frustrating as VLC usually fails to play anything (maybe I'm doing it totally wrong though).

Anyway, I'd be happy if someone pointed me to a easy-to-use library or similar that just took care of the playback for me, (mos开发者_运维知识库tly) bug free


You should probably utilize DirectX for this. Alternatively, I have seen a solution using Silverlight, where Silverlight resides in a hosted web browser panel. A very dirty hack, but would be slightly more cross-platform if that's an issue. But, DirectX is where you should begin: http://msdn.microsoft.com/en-us/library/bb324497%28v=vs.85%29.aspx


I think there is a windows media player dll you can import in Visual studio: wmp.dll

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/7db19938-c34c-4085-bbe5-9e0725827e8c/

Don't know that will fit your needs ...


Use a MediaElement if possible... i use it on WPF and its just about loading the URI for the audio/video file and it starts playing (It can even stream off internet). I think this is also available for SL, but im not quite sure :S

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜