Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

The video tag does not autoplay when the source is mapped to a variable in a Blazor Server app .net 6

$
0
0

While using the source as a variable, the video does not autoplay. However, it works properly if the source is used directly.

Project blazor server app .net 6

<video id="videoPlayer" width="100%" height="100%" controls autoplay muted playsinline loop><source src="@src" type="video/mp4"></video>@code {    string src = "Videos/RPReplay_Final1732704033.mp4";}

It is working properly while play the video using Js. The video tag should autoplay properly whether the source is set using a variable or a direct path.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>