我已经浏览了这里提出的所有其他问题,但没有什么能真正解决我的问题。
目前,视频可以在 Chrome、Safari、FF 和 IE9 中加载和播放,但不能在 IE8 中加载,这是我需要支持的最后一个浏览器。您可以查看页面here http://2013.gradientsummit.com.
我一直在尝试使用“调试”选项,但也没有从中获得任何帮助。这是调试器告诉我的内容:
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&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>
在 MediaElement 网站之后,我添加了范围来输出模式,该模式返回为“未定义”而不是“本机”或“flash”。不确定这是否是问题所在,但此时我只是不知道该去哪里寻找。
任何帮助是极大的赞赏。
我以前遇到过这个问题,花了一段时间才找出原因。我已经对此进行了测试,它似乎也适用于您的情况:
在 MediaElement 创建的 .me-plugin div 上,有一个position: absolute;
CSS 中的参考。当我将其设置为position:static;
IE8 一切顺利。
我通常最终会这样做:
.ie8 .me-plugin { position: static; }
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)