clappr是用于Web的可扩展的媒体播放器,跨平台,支持HLS,MP4等格式。
格式支持:
FormatIE10IE11FirefoxChromeSafariiPhoneiPadAndroidHLSMP4MP3DASHRTMP使用:
添加以下的脚本到你的HTML:
<head> <script type="text/javascript" charset="utf-8" src="https://cdn.clappr.io/latest/underscore.js"> </script> <script type="text/javascript" charset="utf-8" src="https://cdn.clappr.io/latest/jquery.js"> </script> <script type="text/javascript" charset="utf-8" src="https://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: "https://your.video/here.mp4"}); player.attachTo(playerEl); </script></body>
评论