我不确定我的MediaElements.js实现设置是否错误,或者我是否可以解决这个问题。它适用于我尝试过的所有浏览器,除了IE 8.视频播放和暂停都很好,但是当你尝试调整音量或进入全屏时,它会搞砸视频。我录制了这个问题的视频,请看这里: http://adamdealoe.com/me_video_problem/index.php
以下是我在我的网站中使用的代码:
<video width="500" height="300" poster="video/poster.jpg" controls="controls" preload="none">
<!-- MP4 for Safari, IE9, iPhone, iPad, Android, and Windows Phone 7 -->
<source type="video/mp4" src="video/rnt_day_9.mp4" />
<!-- WebM/VP8 for Firefox4, Opera, and Chrome -->
<source type="video/webm" src="video/rnt_day_9.webm" />
<!-- Ogg/Vorbis for older Firefox and Opera versions -->
<source type="video/ogg" src="video/rnt_day_9/rnt_day_9.ogg" />
<!-- Flash fallback for non-HTML5 browsers without JavaScript -->
<object width="500" height="300" type="application/x-shockwave-flash" data="me_build/flashmediaelement.swf">
<param name="movie" value="me_build/flashmediaelement.swf" />
<param name="flashvars" value="controls=true&file=/video/rnt_day_9.flv" />
<!-- Image as a last resort -->
<img src="/video/poster.jpg" width="500" height="300" title="No video playback capabilities" />
</object>
</video>
当然,我已经在<head>
部分得到了所有这些:
<script src="me_build/jquery.js"></script>
<script src="me_build/mediaelement-and-player.min.js"></script>
<link rel="stylesheet" href="me_build/mediaelementplayer.css" />
<script>
// jQuery method
$('video').mediaelementplayer();
</script>
<script>
// normal JavaScript
var player = new MediaElementPlayer('#player');
</script>
任何想法或建议都将不胜感激。 - 亚当