【发布时间】:2011-09-05 15:47:26
【问题描述】:
我在我的网站中使用了mediaelement.js,我在示例中使用了一个带有 H.264 编解码器的 .mp4 文件,它在所有浏览器中都可以正常工作,但是当我发布地点。在我的本地主机上,它没有任何问题(flash fallback 效果很好),但在我的服务器上它不起作用。
我使用的代码是:
<!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。
【问题讨论】:
标签: flash mp4 mediaelement.js fallback video-player