Serge
April 27, 2022, 1:06pm
1
Hello everyone,
I'm using Radzen 2.38.6 and C# to create a blazor server side application.
I need to display a video somewhere in the UI but there is no "video component" available.
How can I integrate a video into my project? Is a component of this type planned in the future?
Best regards.
You can use the HTML video element. We probably won't create a component as there isn't much we can add to extend the built-in browser capabilities.
Serge
April 27, 2022, 1:16pm
3
Thank you for your quick response.
If I add html code to a page generated by radzen, I imagine that the change will be lost with each change made on the radzen side.
I know I can set radzen to ignore a file (code generation ignore list) but in that case I won't be able to touch it with radzen.
Is there a way to overcome this problem?
Thanks again.
enchev
April 27, 2022, 1:29pm
4
You can define arbitrary HTML using HTML component:
Serge
April 27, 2022, 1:47pm
5
Okay, thank you, it works perfectly. I integrated via radzen an html component and I get :
<div class="col-md-9">
<RadzenHtml>
<video controls width="250">
<source src="/assets/videos/video1.mp4" type="video/mp4">not supported.
</video>
</RadzenHtml>
</div>
Do I have a way to change the video name dynamically? Something like:
<source src="/assets/videos/${videoname}"
videoname being a protected property in my code?
EDIT
<source src="@(videoname)" type="video/mp4">
works.
Thanks for your help.