mediaelement.js视频无法在IE8中播放 [英] mediaelement.js video doesn't play in IE8

查看:151
本文介绍了mediaelement.js视频无法在IE8中播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经查看了此处提出的所有其他问题,但没有任何问题真正解决了我的问题。

I've looked through all the other questions posed here, and nothing has really solved my problem.

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

At present the video will load and play in Chrome, Safari, FF, and IE9, but NOT IE8 which is the last browser I need to support. You can view the page here.

我去过尝试使用Debug选项,但也没有得到任何帮助。以下是调试器告诉我的内容:

I have been trying to use the Debug option, but not getting any help from that either. Here is what the debugger is telling me:

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网站后,我添加了范围以输出模式,该模式返回为undefined 而不是原生或闪光。不确定这是不是问题,但此时我只是不知道在哪里看。

following with the MediaElement website, I added the span to output the mode, which is returning as "undefined" instead of either "native" or "flash". Not sure if this is the problem, but at this point I just don't know where to look.

非常感谢任何帮助。

推荐答案

我以前遇到过这个问题,需要一段时间才能找出原因。我已经对此进行了测试,它似乎也适用于您的情况:

I've had this problem before and it took a while to find out what causes it. I've tested this out and it seems to work in your case as well:

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

On the .me-plugin div that MediaElement creates, there's a position: absolute; reference in the CSS. When I set it to position:static; All is well in IE8.

我通常最终这样做:

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

这篇关于mediaelement.js视频无法在IE8中播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆