How to play a Azure Media Video in a Blazor Webassembly app

Peter le Grand 21 Reputation points

I am trying to play a Azure Media Service video in a Blazor Webassembly componenet.

the video works when I play it in Azure media player but I have difficulty getting this in a blazor component.

Also I have tried the following tag:

<video id="vid1" class="azuremediaplayer amp-default-skin" autoplay controls width="640" height="400" poster="images/EULogo.png" data-setup='{"nativeControlsForTouch": false}'>
<source src="" type="application/" />
<p class="amp-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video

But it doesn't play either.

What is the best way to play a Azure Media Services video in a Blazor web assembly?



Azure Media Services
Azure Media Services
A group of Azure services that includes encoding, format conversion, on-demand streaming, content protection, and live streaming services.
267 questions
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
889 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce ( 31,741 Reputation points

    blazor wasm does not effect the browsers support of video or js. use the browsers debug tools to verify the <video> tag was generated correctly and the src is valid.

    also check that the azure js and css links loaded correctly.

  2. John Deutscher (MSFT) 2,121 Reputation points Microsoft Employee

    Check in with the owners of this project called Blazorise.

    I know that they have been working hard on support for HLS and DASH playback in Blazor that works with Media Services.
    Check out the Issue history here -