可扩展的H5 Web播放器
支持移动端和PC端
XML/HTML Code
- <div class="row main">
- <div class="col-md-12">
- <div class="container" style="width: 96%; margin: 30px auto">
- <div id="player"></div>
- </div>
- </div>
- </div>
JavaScript Code
- <script>
- // var player = new Clappr.Player({
- // source: "http://clappr.io/highline.mp4",
- // parentId: "#player"
- // });
- var playerElement = document.getElementById("player");
- var player = new Clappr.Player({
- source: 'http://clappr.io/highline.mp4',
- poster: 'http://clappr.io/poster.png',
- //mute: true,
- height: 360,
- width: '100%',
- autoPlay: true,
- //loop: true,
- //audioOnly: true,
- watermark: "http://www.freejs.net/images/logo.png",
- position: 'top-right',
- watermarkLink: "http://www.freejs.net/"
- });
- player.attachTo(playerElement);
- </script>
原文地址:http://www.freejs.net/article_yingyueshipin_693.html