jed*_*unk 3 javascript jquery html5 internet-explorer-8 mediaelement.js
我已经查看了这里提出的所有其他问题,没有什么能真正解决我的问题.
目前,视频将在Chrome,Safari,FF和IE9中加载和播放,但不是IE8,这是我需要支持的最后一个浏览器.您可以在此处查看该页面.
我一直在尝试使用Debug选项,但也没有得到任何帮助.以下是调试器告诉我的内容:
Initializing...
stage: 0x560
file: path/to/video.mp4
autoplay:true
preload:true
isvideo:true
smoothing:false
timerrate:250
displayState:true
ExternalInterface.available:true
ExternalInterface.objectID: me_flash_0
Adding callbacks...
Success...
METADATA RECEIVED:900x560
positioning video
seek:0
play
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
<video id="player1" width="900" height="560" loop="true" autoplay="true" preload="none" >
<source type="video/mp4" src="<?php echo get_template_directory_uri(); ?>/images/curtainLoop.mp4" />
<source type="video/webm" src="<?php echo get_template_directory_uri(); ?>/images/curtainLoop.webm" />
<object width="900" height="560" type="application/x-shockwave-flash" data="<?php echo get_template_directory_uri(); ?>/js/flashmediaelement.swf">
<param name="movie" value="<?php echo get_template_directory_uri(); ?>/js/flashmediaelement.swf" />
<param name="flashvars" value="autoplay=true&controls=true&file=<?php echo get_template_directory_uri(); ?>/images/echo-hereweare.mp4" />
</object></video>
<span id="player1-mode"></span>
<script>
jQuery(document).ready(function($) {
var player = new MediaElementPlayer('#player1', {
enablePluginDebug: true,
enableAutosize: true,
success: function(media, node, player) {
$('#' + node.id + '-mode').html('mode: ' + player.pluginType);
}
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
跟随MediaElement网站,我添加了span来输出模式,该模式返回为"undefined"而不是"native"或"flash".不确定这是不是问题,但此时我只是不知道在哪里看.
任何帮助是极大的赞赏.
小智 5
我以前遇到过这个问题,需要一段时间才能找出原因.我已经对此进行了测试,它似乎也适用于您的情况:
在MediaElement创建的.me-plugin div上,position: absolute;CSS中有一个引用.当我把它设置为position:static;All在IE8中很好.
我通常最终这样做:
.ie8 .me-plugin { position: static; }
Run Code Online (Sandbox Code Playgroud)