IE 中的 Mediaelement.js 故障,没有闪回工作 [英] Mediaelement.js malfunction in IE, no flashback works

查看:25
本文介绍了IE 中的 Mediaelement.js 故障,没有闪回工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站中使用了 mediaelement.js,我在示例中使用了一个带有 H.264 编解码器的 .mp4 文件,在所有浏览器中都运行良好,但在任何版本中都不起作用发布站点时的 Internet Explorer.在我的本地主机上,它没有任何问题(闪存回退运行良好),但在我的服务器中它不起作用.

I used the mediaelement.js in my site, I used for the example a .mp4 file with H.264 codec, works well in all browsers, but it doesn't works in any version of Internet Explorer when I publish the site. On my localhost, it doesn't have any problems (the flash fallback works well), but in my server it doesn't works.

我使用的代码是:

<!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.

The player works in this direction http://www.teletica.com/html5.

推荐答案

感谢一百万的调查工作和解决方案——我最终使用了

Thanks a million for the investigative work and the solution — I ended up going with the slightly more separated code of

var options = {...}

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

$('video, audio').mediaelementplayer(options);

这篇关于IE 中的 Mediaelement.js 故障,没有闪回工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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