@inherits umbraco.MacroEngines.DynamicNodeContext
@{
if(!String.IsNullOrEmpty(Parameter.source)) {
var videoWidth = Parameter.width;
var videoHeight = Parameter.height;
var videoSource = Library.MediaById(Parameter.source);
<video width="@videoWidth" height="@videoHeight" controls>
<source src="@videoSource" type="video/mp4">
Your browser does not support the video tag.
</video>
}
}
Razor for HTML Video
Hi,
I thought I had this syntax correct, but I am not seing the .mp4 file load into the player on the page. What do I need to change?
Right now it outputs this HTML:
src="umbraco.MacroEngines.DynamicMedia" type="video/mp4"
Figured it out myself.
Should be:
Would like to know how to add an easy fallback for flash though. Any help would be appreciated.
For flash fallback look here http://camendesign.com/code/videoforeverybody
All the best
Rune
is working on a reply...