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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.