IE中的Mediaelement.js出现故障,没有闪回。

| 我在网站中使用了“ 0”,例如,带有H.264编解码器的.mp4文件在所有浏览器中均正常运行,但在发布该网站时,它在任何版本的Internet Explorer中均不起作用。在我的本地主机上,它没有任何问题(闪存回退效果很好),但是在我的服务器上,它却无法工作。 我使用的代码是:
<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
    <title>VIDEO HTML5</title>

    <script type=\"text/javascript\" src=\"player_files/jquery.js\"></script>
    <script type=\"text/javascript\" src=\"player_files/mediaelement-and-player.min.js\"></script>
    <link href=\"player_files/mediaelementplayer.min.css\" rel=\"Stylesheet\" />
</head>

<body>


<video id=\"video1\" src=\"http://www.teletica.com/html5/videos/precious.mp4\" width=\"640\" height=\"360\" poster=\"http://www.teletica.com/html5/videos/precious.jpg\" controls=\"controls\" preload=\"none\"></video>

<video width=\"640\" height=\"360\" id=\"video2\" poster=\"videos/precious.jpg\" controls=\"controls\" preload=\"none\">
    <source type=\"video/mp4\" src=\"http://teletica.com/html5/videos/precious.mp4\" />
    <source type=\"video/webm\" src=\"http://teletica.com/html5/videos/precious.webm\" />

    <object width=\"640\" height=\"360\" type=\"application/x-shockwave-flash\" data=\"player_files/flashmediaelement.swf\">        
        <param name=\"movie\" value=\"player_files/flashmediaelement.swf\" /> 
        <param name=\"flashvars\" value=\"controls=true&file=http://teletica.com/html5/videos/precious.mp4\" />         

        <img src=\"player_files/precious.jpg\" width=\"640\" height=\"360\" alt=\"Here we are\" title=\"No video playback capabilities\" />
    </object>   
</video>

<script type=\"text/javascript\">
    $(\'video, audio\').mediaelementplayer();
</script>
  播放器朝
http://www.teletica.com/html5
方向工作。     
已邀请:
        我遇到了同样的问题,并在另一篇文章中找到了一个未记录的功能:
mode:shim
〜不确定其功能,但似乎迫使所有浏览器都转而使用Flash。 由于chrome,ios等适用于html5视频,因此我使用条件注释来指定IE9并强制回退(闪光灯或Silverlight):
        var player = new MediaElementPlayer(\'video\', {
/*@cc_on
@if (@_jscript_version == 9)
            mode: \'shim\',
@end
@*/
            // remove or reorder to change plugin priority
            plugins: [\'flash\',\'silverlight\'],

            // etc...

        }
    
        感谢一百万的调查工作和解决方案-我最终使用了稍微分开的代码
var options = {...}

/*@cc_on
  @if (@_jscript_version == 9)
    options.mode = \'shim\';
  @end
@*/

$(\'video, audio\').mediaelementplayer(options);
    
        只是将其放在这里,以便其他人看到它,我尝试使用此代码
/*@cc_on
@if (@_jscript_version == 9)
            mode: \'shim\',
@end
@*/
最后,我在Internet Explorer 9中遇到了问题,似乎浏览器正在制作我的视频的另一个实例,该实例可以播放所有其他内容,而我根本无法控制。我最终选择了这个。
if($.browser.msie && ($.browser.version == \'8.0\' || $.browser.version
== \'7.0\'))
        options.mode = \'shim\';
    
        由于您的问题仅在您的系统上仍然存在,因此您的设置或Flash Player可能存在问题。您可以尝试以下操作: 如果您正在运行任何脚本,请尝试禁用这些脚本并再次播放视频。 如果您有任何辅助Flash播放器,例如\“ Gnash \”,请尝试将其删除。 您的骨肉播放器极有可能已损坏。尝试重新安装。 如果这些都不起作用,请尝试清除Cookie,缓存和历史记录。 您也可以重新安装Internet Explorer,然后查看它是否有效。祝一切顺利! :)     

要回复问题请先登录注册