Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jun 18, 2017
1 parent 3e28cb9 commit bb33043
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ <h2>Wow, such a lovely HTML5 danmaku video player</h2>
<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>
Expand Down
2 changes: 1 addition & 1 deletion dist/DPlayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/DPlayer.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/DPlayer.js
Original file line number Diff line number Diff line change
@@ -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');
Expand All @@ -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];
Expand Down

0 comments on commit bb33043

Please sign in to comment.