我mediaelement.js
在我的站点中使用了 .mp4 文件作为示例,它具有 H.264 编解码器,在所有浏览器中都可以正常工作,但是当我发布站点时,它在任何版本的 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
。