1614061629
I came across a problem the other day where I needed to play a sound file in a Blazor WebAssembly application, but there were very limited resources as to how to do this. So, once I figured it out, I also figured that someone else was going to have this problem.
(Even if that person is just me in the future).
Let’s see how to play a sound in Blazor!
As always, there’s a sample project on GitHub that has the code we’re going to write in this post. Check it out!
There are five steps we need the ability to play a sound in Blazor:
<audio>
element.IJSRuntime
injected to our Blazor component.IJSRuntime
to invoke the JavaScript method.#blazor #javascript #webassembly #programming
1598095640
#blazor #blazor in c# #blazor tutorial #blazor webassembly #blazor crud #blazor with asp.net core
1593023657
#blazor #blazor tutorial #blazor in c# #blazor crud #blazor webassembly #blazor with asp.net core
1591572416
#blazor #blazor tutorial #blazor crud #blazor api #blazor with asp.net core #blazor in c#
1582380593
#Blazor #Blazor tutorial #Blazor c# #Blazor dropdown #Blazor core api
1587086211
#blazor #blazor tutorial #blazor curd #blazor in c# #blazor webassembly