update version
This commit is contained in:
parent
3e28cb9d29
commit
bb33043ea5
16
README.md
16
README.md
|
|
@ -36,6 +36,22 @@ $ npm install dplayer --save
|
|||
|
||||
[RawGit](https://rawgit.com/DIYgod/DPlayer/master/dist/DPlayer.min.js)
|
||||
|
||||
## Quick Start
|
||||
|
||||
```js
|
||||
var dp = new DPlayer({
|
||||
element: document.getElementById('player1'),
|
||||
video: {
|
||||
url: 'dplayer.mp4',
|
||||
pic: 'dplayer.png'
|
||||
},
|
||||
danmaku: {
|
||||
id: 'testid',
|
||||
api: 'https://api.prprpr.me/dplayer/'
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
See [docs](http://dplayer.js.org/docs)
|
||||
|
|
|
|||
|
|
@ -52,18 +52,18 @@
|
|||
<p>Made by <a href="https://www.anotherhome.net/" target="_blank">DIYgod</a>. Available on <a href="https://github.com/DIYgod/DPlayer" target="_blank">GitHub</a>. Licensed SATA.</p>
|
||||
<hr>
|
||||
<h3>Normal</h3>
|
||||
<div class="dplayer" id="dplayer1"></div>
|
||||
<div id="dplayer1"></div>
|
||||
<button onclick="switchDPlayer()">Switch Video</button>
|
||||
<h3>Quality switching</h3>
|
||||
<div class="dplayer" id="dplayer6"></div>
|
||||
<div id="dplayer6"></div>
|
||||
<h3>Live Video (HTTP Live Streaming, M3U8 format) support</h3>
|
||||
<div class="dplayer" id="dplayer3"></div>
|
||||
<div id="dplayer3"></div>
|
||||
<h3>FLV format support</h3>
|
||||
<div class="dplayer" id="dplayer4"></div>
|
||||
<div id="dplayer4"></div>
|
||||
<h3>Bilibili video and danmaku support</h3>
|
||||
<div class="dplayer" id="dplayer2"></div>
|
||||
<div id="dplayer2"></div>
|
||||
<!--<h3>Segmented videos</h3>
|
||||
<div class="dplayer" id="dplayer5"></div>-->
|
||||
<div id="dplayer5"></div>-->
|
||||
</div>
|
||||
<script src="https://rawgit.com/mrdoob/stats.js/master/build/stats.min.js"></script>
|
||||
<script src="../plugin/flv.min.js"></script>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "dplayer",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"description": "Wow, such a lovely HTML5 danmaku video player",
|
||||
"main": "dist/DPlayer.min.js",
|
||||
"style": "dist/DPlayer.min.css",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
console.log('\n %c DPlayer 1.2.0 %c http://dplayer.js.org \n\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
|
||||
console.log('\n %c DPlayer 1.3.0 %c http://dplayer.js.org \n\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
|
||||
|
||||
require('./DPlayer.scss');
|
||||
const utils = require('./utils.js');
|
||||
|
|
@ -22,6 +22,8 @@ class DPlayer {
|
|||
constructor (option) {
|
||||
this.option = handleOption(option);
|
||||
|
||||
this.option.element.classList.add('dplayer');
|
||||
|
||||
if (this.option.video.quality) {
|
||||
this.qualityIndex = this.option.video.defaultQuality;
|
||||
this.quality = this.option.video.quality[this.option.video.defaultQuality];
|
||||
|
|
|
|||
Loading…
Reference in New Issue