我将一些 HTML5 视频放在 MVC3 站点中。HTML5 工作正常,但由于某种原因 Flash 在 IE 中没有响应,它甚至不会显示图像。
这是我的代码:
<video width="530px" height="445px" id="player1" poster="@Url.Content("~/Content/images/races/circuits/" + Model.Race.shortCode + ".png")" controls="controls" preload="none">
<source src="@Url.Content("~/Content/video/races/" + Model.Race.shortCode + ".mp4")" type="video/mp4" />
<source src="@Url.Content("~/Content/video/races/" + Model.Race.shortCode + ".webm")" type="video/webm" />
<object width="530" height="445" type="application/x-shockwave-flash" data="@Url.Content("~/Content/flash/flashmediaelement.swf")">
<param name="movie" value="@Url.Content("~/Content/flash/flashmediaelement.swf")" />
<param name="flashvars" value="controls=true&file=@Url.Content("~/Content/video/races/" + Model.Race.shortCode + ".mp4")" />
<!-- Image as a last resort -->
<img src="@Url.Content("~/Content/images/races/circuits/" + Model.Race.shortCode + ".png")" width="530px" height="445px"/>
</object>
<script type="text/javascript">
$('audio,video').mediaelementplayer({
success: function (player, node) {
$('#' + node.id + '-mode').html('mode: ' + player.pluginType);
}
});
</script>
有谁知道问题可能是什么?