Open baskren opened 1 month ago
In WASM platform, Media player fails to load local asset.
MediaPlayer.Source = MediaSource.CreateFromUri(new Uri("ms-appx:///Assets/Sounds/Alarm.mp3")); MediaPlayer.Play();
NOTES:
Uno.WinUI.MediaPlayer.WebAssembly
MediaElement
dotnet build
dotnet serve
bin/Debug/net8.0-browserwasm/dist/package_xxxx/Assets/Sounds/Alarm.mp3
Local assets are loaded by WASM MediaPlayer, just as they are with other platforms
Demo Project: https://github.com/baskren/WasmMedia
Build custom media player?
Yes
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
5.3.90
WebAssembly
Visual Studio 2022
Microsoft Visual Studio Community 2022 (ARM 64-bit) - Current Version 17.10.4
n/a
No response
Thanks for the report. This feature is not implemented at this time, we're tracking this as part of https://github.com/unoplatform/uno/issues/2642.
Current behavior
In WASM platform, Media player fails to load local asset.
NOTES:
Uno.WinUI.MediaPlayer.WebAssembly
NuGet package AND/ORMediaElement
Featuredotnet build
+dotnet serve
.bin/Debug/net8.0-browserwasm/dist/package_xxxx/Assets/Sounds/Alarm.mp3
existsExpected behavior
Local assets are loaded by WASM MediaPlayer, just as they are with other platforms
How to reproduce it (as minimally and precisely as possible)
Demo Project: https://github.com/baskren/WasmMedia
Workaround
Build custom media player?
Works on UWP/WinUI
Yes
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
5.3.90
Affected platforms
WebAssembly
IDE
Visual Studio 2022
IDE version
Microsoft Visual Studio Community 2022 (ARM 64-bit) - Current Version 17.10.4
Relevant plugins
n/a
Anything else we need to know?
No response