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

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

问题描述

我在我的网站中使用了mediaelement.js,我用H.264编解码器编写了一个.mp4文件,在所有的浏览器中运行良好,但是在我发布网站的任何版本的Internet Explorer中都不起作用我的本地没有任何问题(Flash后备工作正常),但在我的服务器不起作用。

我使用的代码是:

 <!DOCTYPE HTML> 
< html>
< head>
< meta http-equiv =Content-Typecontent =text / html; charset = utf-8/>
< title> VIDEO HTML5< / title>

< script type =text / javascriptsrc =player_files / jquery.js>< / script>
< script type =text / javascriptsrc =player_files / mediaelement-and-player.min.js>< / script>
< link href =player_files / mediaelementplayer.min.css =Stylesheet/>
< / head>

< body>


< video id =video1src =http://www.teletica.com/html5/videos/precious.mp4width =640height =360 poster =http://www.teletica.com/html5/videos/precious.jpgcontrols =controlspreload =none>< / video>





玩家在这个方向上工作http://www.teletica.com/html5

解决方案

感谢一百万的调查工作和解决方案 - 我最后用了稍微更分离的代码

  var options = {...} 

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

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


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 not works in any version of Internet explorer when i publish the site, on my localhost don't have any problem (the flash fallback works well) , but in my server don't works.

The code the i used is:

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

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天全站免登陆