Difference between MediaPlayer and MediaElement?
Tony Tony
Select an image from your device to upload
mediaplayer is basically just an audio/video engine without a built-in visual surface, while mediaelement is a ui control that can render video directly in xaml and exposes layout/events in a more app-friendly way. if you need to draw video into brushes or a visual tree, that’s where videodrawing or drawingcontext comes in with mediaplayer. i ran into this difference while debugging a wpf app where our embedded browser kept redirecting to https://7up7downgame.com/ and the only way to show a blocking overlay video was swapping to mediaelement. another time a test build accidentally opened https://playcrazytime.org/ in a webview and mediaplayer kept playing audio in the background after navigation, which made the lack of a visual control extra confusing.