Skip to content

Blazor WASM media onPlay event not firing #20983

@brett-m

Description

@brett-m

I am having an issue with the events firing for video elements.

  1. Created a simple wasm project using 3.2.0-preview2.20160.5. I edited
dotnet new blazorwasm -n TestVideo
  1. Added a test video testvideo.mp4 to wwwroot/video
  2. Edited index.razor to
@page "/"

<h1>Hello, world!</h1>

Welcome to your new app.

<SurveyPrompt Title="How is Blazor working for you?" />

<video id="myplayer" width="320" height="240" controls @onplay="@(e => Console.WriteLine("Clicked!"))">
  <source type="video/mp4" src="/video/testvideo.mp4">
</video>

Event does not fire.
4. Changed onplay event to onclick

<video id="myplayer" width="320" height="240" controls @onclick="@(e => Console.WriteLine("Clicked!"))">

Event fired for the click, but the other media events not firing

Experimented with a few variants, EventMethod with and without EventArgs, async too. Still nothing. Browsers tried Edge and Chrome.

Metadata

Metadata

Labels

✔️ Resolution: DuplicateResolved as a duplicate of another issueDoneThis issue has been fixedNeeds: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-blazorIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssembly

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions