Home > Enterprise >  Mp3 player in WinUi 3 xaml
Mp3 player in WinUi 3 xaml

Time:08-10

I want to play a mp3 audio on a image in WinUi 3 desktop application. Can anyone help me out. Simple mp3 audio on a image with auto play feature

CodePudding user response:

You can use class Windows.Media.Playback.MediaPlayer

mediaPlayer = new MediaPlayer();
mediaPlayer.Source = MediaSource.CreateFromUri(new Uri("ms-appx:///Assets/example_audio.mp3"));
mediaPlayer.Play();

There are enough examples in the documentation. I am using this class for a WinUI 3 Internet radio player.

The class doesn't feature an UI, you should build the UI yourself.

  • Related