gpt4 book ai didi

javascript - mediaelement.js 视频无法在 IE8 中播放

转载 作者:搜寻专家 更新时间:2023-10-31 23:09:14 25 4
gpt4 key购买 nike

我已经查看了这里提出的所有其他问题,但没有什么能真正解决我的问题。

目前视频将在 Chrome、Safari、FF 和 IE9 中加载和播放,但不能在 IE8 中加载和播放,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 网站之后,我添加了 span 以输出模式,它返回为“undefined”而不是“native”或“flash”。不确定这是否是问题所在,但此时我只是不知道去哪里找。

非常感谢任何帮助。

最佳答案

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

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

我通常会这样做:

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

关于javascript - mediaelement.js 视频无法在 IE8 中播放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12099535/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com