Why is EventArgs e empty when using @volumechange event in Blazor MAUI video tag?

125 views Asked by At

I receive empty EventArgs if i use the @onvolumechange event in a .NET Blazor MAUI app on windows.

Player in Razor file:

<video @onvolumechange="@(e => PlayerVolumeChanged(e))" class="video" controls disablepictureinpicture controlslist="nodownload nofullscreen noremoteplayback noplaybackrate" autoplay onloadstart="this.volume=@_videoPlayerVolume" onclick="this.paused ? this.play() : this.pause();">
    <source src="@video" type="video/mp4">
</video>

Logic in C# file: private void PlayerVolumeChanged(EventArgs e) { // e is empty here... }

I am looking for a non-JavaScript solution to store the current volume of the player. The requirement is that the video player plays the video at the same volume every time. I expected the volume is stored in EventArgs e. But e is empty. Debug session in Visual Studio 2022

0

There are 0 answers