May 24, 2013, 10:10 PM
HTML5 Video tag and Ext.Net
Hi,
I'm using Ext.net with my mvc 3 web project and I'm trying to insert a <video> tag inside of a Html.X().Panel inside .HTML(). If I do this in a html file outside my project it works but if I do this inside my project, an error appears about my file path. I need to do this because the client wants to run the app in iPads...
This is my html "page" outside the project
I'm using Ext.net with my mvc 3 web project and I'm trying to insert a <video> tag inside of a Html.X().Panel inside .HTML(). If I do this in a html file outside my project it works but if I do this inside my project, an error appears about my file path. I need to do this because the client wants to run the app in iPads...
This is my html "page" outside the project
<!DOCTIPE HTML>
<head></head>
<body>
<div style="position: absolute; bottom: 0; left: 0; width:100%; height:100%;">
<video width="100%" height="100%" controls >
<source src="X:/icManagerFiles/Video/File.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</body>
<footer></footer>
And this is my html "partial view" inside the project:@model BE.ContentContainer
@{
var pnlMedia = Html.X().Panel();
var pnlPreview = Html.X().Panel()
.Border(false)
.BodyStyle("background-color: transparent;")
.LayoutConfig(new HBoxLayoutConfig { Align = HBoxAlign.Stretch, DefaultMargins = "2" })
.Items(i =>
{
i.Add(pnlMedia);
if (Model != null)
{
foreach (BE.Content c in Model.Items)
{
string[] type = c.fileMime.Split('/');
switch (type[0])
{
case "video":
pnlMedia
.Flex(1)
.Html
(
@<div style="position: absolute; bottom: 0; left: 0; width:100%; height:100%;">
<video width="100%" height="100%" controls >
<source src="X:/icManagerFiles/Video/File.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
);
break;
}
}
}
});
}
@(
pnlPreview.Show()
)
Can anyone have achieved this before?... Any help or suggestion is welcome... ()