Is it possible to use the WPF MediaElement to play streaming video from a System.IO.Stream object? The Stream object is being retrieved from a WCF service that stores the media files.
Before anyone wastes hours finding this out for themselves: it is impossible to host the Silverlight MediaElement in a WPF application. The reason for this is that it is one of a number of types that appear in PresentationFramework.dll (unavoidable for WPF) and System.Windows.dll (Silverlight versions) that have the same names and the same namespaces, but are different types. (Someone should explain why we have namespaces to microsoft!)
I know this isn't what you asked for but you can host a VLC ActiveX component inside a window in WPF and then use that VLC control to connect to the stream and display the stream. This is how I got streaming working through WPF.
Edit: this page has an example of how to host an ActiveX control inside WPF
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With