Html 在浏览器中播放mp4、mpeg、mkv文件

Html 在浏览器中播放mp4、mpeg、mkv文件,html,asp.net-mvc-3,razor,multimedia,Html,Asp.net Mvc 3,Razor,Multimedia,这是我的查看页面。我必须根据我的文件格式播放mpeg、mp4、mkv文件,这些文件存储在foreach循环中。但它不起作用。请帮助我如何实现这一点?我必须在我的查看页面上播放所有这三种文件格式 <div style="width:98%;float:left; height:auto;margin:0 1%;"> @foreach (string vidf in Model.SVideo) { string[] arr = new string[@Model.SVideo.

这是我的查看页面。我必须根据我的文件格式播放mpeg、mp4、mkv文件,这些文件存储在foreach循环中。但它不起作用。请帮助我如何实现这一点?我必须在我的查看页面上播放所有这三种文件格式

<div style="width:98%;float:left; height:auto;margin:0 1%;">

@foreach (string vidf in Model.SVideo)
{
    string[] arr = new string[@Model.SVideo.Count()];
    string ss = @vidf.ToString();
    arr = @vidf.Split('.');
    string ext =arr[1];
    if (ext != "mpeg")
    {
<div style="width:295px;display:inline-block;margin:10px 5px;">

        <video width="320" height="240" poster="poster.jpg" controls="controls" preload="none">
        <source type="video/mp4" src="@vidf" />  
        <track kind="subtitles" src="subtitles.srt" srclang="en" />
        <track kind="chapters" src="chapters.srt" srclang="en" />    
        </video>

 </div> 
    }
    else
    {
        <object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
        standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280" height="256">
        <param name="fileName" value="@vidf">
        <param name="animationatStart" value="true">
        <param name="transparentatStart" value="true">
        <param name="autoStart" value="true">
        <param name="showControls" value="true">
        <param name="Volume" value="-450">
        <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="@vidf" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
        </object>
    }        
}
</div>

我将如何使用VLC解决此问题?你能详细说明一下吗?VLc提供webplugin,正如你所知道的,VLc支持很多文件格式,所以它最适合这种方法。我在我的一个项目中使用了。你愿意分享你的代码吗?Thanx in advanceI我现在手头没有代码,但是你可以在google上到处搜索,你可以很容易地在VLC的开发者论坛上找到可能的副本