Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing application that receives media content(.mp3/.mp4/.avi) in form of bytes.
However, as WPF doesn't support playing media from stream, So I started with WMP.dll.
I am creating class library that receives media in form of bytes and media format and play media accordingly.
Referring Creating the WMP Programmatically, however, I didn't find method to pass bytes stream.

So my question is how do I play media from bytes using wmp.dll?

(I am using 'WMP.dll' through COM and located at 'C:\WINDOWS\system32\wmp.dll')
Posted

1 solution

You cannot pass a byte stream to MediaPlayer and expect it to work. MediaPlayer doesn't support it.

You will have to use a different player that does. I don't know of one off the top of my head.

An alternate method would be to use DirectShow, but that's not exactly easy.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900