HTML5 Content

I am using Radzen 2.86.8 to build a Blazor app and I am trying display a video file using the HTML component. I have set the content to:

image

I have confirmed the location is correct. I when I run the application I get a 404 error that the file is not found. Can someone confirm I am using the HTML content property correctly?

Thank you!

The /videos path is rooted which could be incorrect. You can inspect the generated video element with the browser developer tools to see what the actual path is.

Thank you for the quick response.

I have verified in the IIS configuration and also in the content.

When I execute “file:///K:/Plant_Reporting/wwwroot/Videos/VPASession1.mp4” from a browser, the file works.
When I execute “/Plant_Reporting/wwwroot/Videos/VPASession1.mp4” from the application I get the 404 error. The application and file are on the server that I have mapped to my client as K:

The browser developer tools only reports:

image

The HTML component expression is

I think the path is wrong. Usually wwwroot isn't part of the URL.

The errors are the same if I shorten the path to image

I am concerned that I dont have the correct syntax in the content of the HTML component. Should the component be using HTML video tags?

I have solved the issue by changing the content to

but when I try to pass the content by setting a property I get: error CS0103: The name 'Html0' does not exist in the current context’ when trying to use html0.Reload();

I suggest using an expression for that:

<source src="${myProperty}" type="video/mp4" />

or

<source src="@(myProperty)" type="video/mp4" />

By the way we strongly recommend upgrading to Radzen Blazor Studio:

  1. It supports code editing and doesn't need the Html component - you can type any Blazor markup
  2. It supports up-to-date Blazor versions
  3. We are actively releasing updates to it - new features, new components etc.