我在MVC3网站上放了一些HTML5视频。 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>
有谁知道问题可能是什么?
答案 0 :(得分:1)
我不确定你要对data=
字段做什么,但我知道媒体元素播放器真的更喜欢直接链接。当我尝试相关链接时,我没有显示。这似乎不会给每个人带来问题,但值得一试。