Stopbyte

Why UWP MediaElement plays audio/sound but doesn’t show Video?

I tried using a MediaElement within my XAML page in UWP project.

Adding MediaElement was straightforward but after when loading a video file the video is shown fine, but audio is not played at all.

<MediaElement x:Name=”MediaElement1″ Source=”http://localhost/media/video-audio.mp3” AutoPlay=”True”  />

I tried using some Apps/samples for UWP Apps I could find on the internet but didn’t work as well. So I guess it’s an issue related to my local machine or configuration rather than a Coding issue.

Any hints!

2 Likes

It’s really a common issue with the MediaElement, it’s mostly a Driver issue.

make sure you install the appropriate Video & Audio drivers for your machine.

1 Like

You must do as follows:

  1. Make sure all your audio drivers are up to date.

  2. Since you are posting your issue in here, I’m sure damaged device won’t be an option.

  3. Sometimes, even when drivers show up-to-date, doesn’t mean they are working properly and doesn’t mean the appropriate driver version is installed.
    Windows might install not the best/recommended driver for your device, so make sure to go to your PC manufacturer support website, and download the best driver you can find.

  4. I had a similar issue once with <MediaElement /> i ended up downloading a Catalyst Audio Driver from AMD device drivers website and it’s working fine.

  5. Remember, that in some occasions it can be the opposite, <MediaElement /> plays the audio, but doesn’t display the video (which might mean the opposite needs to be done) At that point you will need to do the same for your Display (Graphics Card) Device Driver.

that should be helpful.