clappr - Web 媒体播放器


未知
跨平台
JavaScript

软件简介

clappr 是用于Web的可扩展的媒体播放器,跨平台,支持HLS,MP4等格式。

格式支持:

Format IE10 IE11 Firefox Chrome Safari iPhone iPad Android
HLS ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png)
MP4 ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png)
MP3 ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png)
[DASH](https://github.com/globocom/clappr/issues/161) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png)
RTMP ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✔](https://assets-cdn.github.com/images/icons/emoji/unicode/2714.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png) ![✖](https://assets-cdn.github.com/images/icons/emoji/unicode/2716.png)

使用:

添加以下的脚本到你的 HTML:

<head>
  <script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/latest/underscore.js"> </script>
  <script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/latest/jquery.js"> </script>
  <script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/latest/clappr.min.js"> </script>
</head>

创建播放器:

<body>
  <div id="player"></div>
  <script>
    var playerEl = document.getElementById("player");
    var player = new Clappr.Player({source: "http://your.video/here.mp4"});
    player.attachTo(playerEl);
  </script>
</body>