我在 SO 和 MediaElements 的网站上查看了其他一些资源,但似乎没有任何效果。
我尝试制作一个 JSFiddle,但它不会在 IE8 中加载:http: //jsfiddle.net/RyzaV/
这是代码:
<div id="video" class="box">
<video width="200" height="155" style="width: 100%; height: 100%;" id="player1" controls="controls" preload="true">
<source type="video/<?php echo $video_format; ?>" src="<?php echo $video_url; ?>" />
<object width="200" height="155" type="application/x-shockwave-flash" data="http://s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/flashmediaelement.swf">
<param name="movie" value="http://s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/flashmediaelement.swf" />
<param name="flashvars" value="controls=true&file=<?php echo $video_url; ?>" />
</object>
</video>
<link type="text/css" rel="stylesheet" href="//s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/mediaelementplayer.min.css" />
<script type="text/javascript" src="//s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/mediaelement-and-player.min.js"></script>
<script type="text/javascript" language="javascript">
$('#video').find('video:first').mediaelementplayer({
success: function(media, node, player) {
$('#' + node.id + '-mode').html('mode: ' + media.pluginType);
}
, flashName: 'flashmediaelement-cdn.swf'
});
</script>
</div>
知道我错过了什么吗?这是参考页面:
http ://www.mediaelementjs.com/#note2