video、audio都是html5的属性,不支持低版本的ie8,个人在用的时候,遇到了这个问题,下面是自己的解决方案
<audio controls="controls" preload="none" src="@SiteUrls.Instance().AttachmentAudioUrl(Model)"> <embed src="@SiteUrls.Instance().AttachmentAudioUrl(Model)" height="44" /> </audio>
<video width="618" height="430" controls="controls" preload="none" autoplay="autoplay"> <source type="video/mp4" src="@SiteUrls.Instance().AttachmentVideoUrl(attachment)" /> <object width="618" height="430" type="application/x-shockwave-flash" data="~/Scripts/mediaelement/flashmediaelement.swf"> <param name="movie" value="~/Scripts/mediaelement/flashmediaelement.swf" /> <param name="flashvars" value="controls=true&[email protected]().AttachmentVideoUrl(attachment)" /> <param name="wmode" value="opaque"> </object> </video>
时间: 2024-11-05 20:10:29