3

我已经浏览了其他所有在这里提出的问题,并没有什么能真正解决我的问题。mediaelement.js视频不能在IE8中播放

目前视频会在Chrome,Safari,FF和IE9中加载和播放,但不是IE8,这是我需要支持的最后一个浏览器。您可以查看页面here

我一直在尝试使用调试选项,但没有得到任何帮助。下面是调试器告诉我:

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 

这里是我的代码:

<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&amp;controls=true&amp;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> 

与MediaElement的网站之后,我加入了跨度输出模式,该模式返回为“未定义”而不是“本地”或“闪光灯”。不知道这是否是问题,但在这一点上,我只是不知道在哪里看。

任何帮助,非常感谢。

回答

5

我以前遇到过这个问题,需要一段时间才能找出是什么原因造成的。我测试过了,它似乎也适用于你的情况:

在MediaElement创建的.me-plugin div上,CSS中有一个position: absolute;引用。当我将它设置为position:static;在IE8中一切都很好。

我通常最终会做这样的:

.ie8 .me-plugin { position: static; }