Merge branch 'master' into master

This commit is contained in:
DIYgod 2019-03-12 22:07:00 +08:00 committed by GitHub
commit cbf31fbec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 53 deletions

View File

@ -46,10 +46,16 @@ Using DPlayer on your project? [Let me know!](https://github.com/DIYgod/DPlayer/
## Thanks
## Special Sponsors
<a href="https://www.polyv.net/?f=git_DPlayer-20190212-01" target="_blank">
<img width="600px" src="https://i.imgur.com/d4XabAe.png">
</a>
### Sponsors
<a href="https://pear.hk/" target="_blank">
<img width="222px" src="https://i.imgur.com/5qQYmfc.png">
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">

View File

@ -8,8 +8,14 @@ search: english
## Special Sponsors
<a href="https://pear.hk/" target="_blank">
<img width="222px" src="https://i.imgur.com/5qQYmfc.png">
<a href="https://www.polyv.net/?f=git_DPlayer-20190212-01" target="_blank">
<img width="600px" src="https://i.imgur.com/d4XabAe.png">
</a>
## Sponsors
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">
@ -63,8 +69,8 @@ const dp = new DPlayer({
Work with module bundler:
```js
import 'DPlayer/dist/DPlayer.min.css';
import DPlayer from 'DPlayer';
import 'dplayer/dist/DPlayer.min.css';
import DPlayer from 'dplayer';
const dp = new DPlayer(options);
```
@ -345,6 +351,8 @@ Player events
- resize
- fullscreen
- fullscreen_cancel
- webfullscreen
- webfullscreen_cancel
- subtitle_show
- subtitle_hide
- subtitle_change

View File

@ -83,8 +83,8 @@ function dplayer1 () {
container: document.getElementById('dplayer1'),
video: {
url: 'https://api.dogecloud.com/player/get.mp4?vcode=5ac682e6f8231991&userId=17&ext=.mp4',
pic: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png',
thumbnails: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara_thumbnails.jpg'
pic: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/hikarunara.png',
thumbnails: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/hikarunara_thumbnails.jpg'
},
danmaku: {
id: '9E2E3368B56CDBB4',
@ -96,14 +96,10 @@ function dplayer1 () {
function dplayer2 () {
window.dp2 = new DPlayer({
container: document.getElementById('dplayer2'),
screenshot: true,
video: {
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.mp4',
pic: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png',
thumbnails: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara_thumbnails.jpg'
},
subtitle: {
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.vtt'
url: 'https://api.dogecloud.com/player/get.mp4?vcode=5ac682e6f8231991&userId=17&ext=.mp4',
pic: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/hikarunara.png',
thumbnails: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/hikarunara_thumbnails.jpg'
},
danmaku: {
id: '9E2E3368B56CDBB4',
@ -119,25 +115,17 @@ function dplayer3 () {
theme: '#FADFA3',
loop: true,
lang: 'zh-cn',
screenshot: true,
hotkey: true,
preload: 'auto',
logo: 'https://moeplayer.b0.upaiyun.com/dplayer/DPlayer.png',
logo: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/DPlayer.png',
volume: 0.7,
mutex: true,
video: {
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.mp4',
pic: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png',
thumbnails: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara_thumbnails.jpg',
url: 'https://api.dogecloud.com/player/get.mp4?vcode=5ac682e6f8231991&userId=17&ext=.mp4',
pic: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/hikarunara.png',
thumbnails: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/hikarunara_thumbnails.jpg',
type: 'auto'
},
subtitle: {
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.vtt',
type: 'webvtt',
fontSize: '25px',
bottom: '10%',
color: '#b7daff'
},
danmaku: {
id: '9E2E3368B56CDBB4',
api: 'https://api.prprpr.me/dplayer/',
@ -179,16 +167,16 @@ function dplayer4 () {
video: {
quality: [{
name: 'HD',
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hls/hikarunara.m3u8',
url: 'https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8',
type: 'hls'
}, {
name: 'SD',
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.mp4',
url: 'https://api.dogecloud.com/player/get.mp4?vcode=5ac682e6f8231991&userId=17&ext=.mp4',
type: 'normal'
}],
defaultQuality: 0,
pic: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png',
thumbnails: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara_thumbnails.jpg'
pic: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/hikarunara.png',
thumbnails: 'https://cn-east-17-dplayer-86110920.oss.dogecdn.com/hikarunara_thumbnails.jpg'
}
});
}
@ -197,27 +185,27 @@ function dplayer5 () {
window.dp5 = new DPlayer({
container: document.getElementById('dplayer5'),
video: {
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hls/hikarunara.m3u8',
url: 'https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8',
type: 'hls'
}
});
}
function dplayer6 () {
window.dp6 = new DPlayer({
container: document.getElementById('dplayer6'),
video: {
url: 'https://moeplayer.b0.upaiyun.com/dplayer/dash/hikarunara.mpd',
type: 'dash'
}
});
// window.dp6 = new DPlayer({
// container: document.getElementById('dplayer6'),
// video: {
// url: 'https://moeplayer.b0.upaiyun.com/dplayer/dash/hikarunara.mpd',
// type: 'dash'
// }
// });
}
function dplayer7 () {
window.dp7 = new DPlayer({
container: document.getElementById('dplayer7'),
video: {
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.flv',
url: 'https://api.dogecloud.com/player/get.flv?vcode=5ac682e6f8231991&userId=17&ext=.flv',
type: 'flv'
}
});
@ -249,7 +237,7 @@ function dplayer9 () {
}
},
video: {
url: 'https://moeplayer.b0.upaiyun.com/dplayer/hls/hikarunara.m3u8',
url: 'https://api.dogecloud.com/player/get.m3u8?vcode=5ac682e6f8231991&userId=17&ext=.m3u8',
type: 'hls'
}
});

View File

@ -30,10 +30,16 @@ Recurring pledges come with exclusive perks, e.g. having your name or your compa
## Current Premium Sponsors
### Special Sponsors
## Special Sponsors
<a href="https://pear.hk/" target="_blank">
<img width="222px" src="https://i.imgur.com/5qQYmfc.png">
<a href="https://www.polyv.net/?f=git_DPlayer-20190212-01" target="_blank">
<img width="600px" src="https://i.imgur.com/d4XabAe.png">
</a>
### Sponsors
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">

View File

@ -9,8 +9,8 @@ search: zh-Hans
## 特别赞助商
<a href="https://pear.hk/" target="_blank">
<img width="222px" src="https://i.imgur.com/5qQYmfc.png">
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">
@ -64,8 +64,8 @@ const dp = new DPlayer({
使用模块管理器:
```js
import 'DPlayer/dist/DPlayer.min.css';
import DPlayer from 'DPlayer';
import 'dplayer/dist/DPlayer.min.css';
import DPlayer from 'dplayer';
const dp = new DPlayer(options);
```

View File

@ -33,8 +33,8 @@ DPlayer 是采用 MIT 许可的开源项目,使用完全免费。 但是随着
### 特别赞助商
<a href="https://pear.hk/" target="_blank">
<img width="222px" src="https://i.imgur.com/5qQYmfc.png">
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">

View File

@ -43,6 +43,7 @@
"exports-loader": "^0.7.0",
"file-loader": "^1.1.11",
"git-revision-webpack-plugin": "^3.0.3",
"mini-css-extract-plugin": "0.4.0",
"node-sass": "^4.9.0",
"postcss-loader": "^2.1.5",
"sass-loader": "^7.0.3",
@ -52,13 +53,12 @@
"template-string-optimize-loader": "^2.2.3",
"url-loader": "^1.0.1",
"webpack": "^4.12.0",
"webpack-cli": "3.0.4",
"webpack-dev-server": "^3.1.4"
},
"dependencies": {
"axios": "0.18.0",
"balloon-css": "^0.5.0",
"mini-css-extract-plugin": "0.4.0",
"promise-polyfill": "8.0.0",
"webpack-cli": "3.0.4"
"promise-polyfill": "8.0.0"
}
}

View File

@ -495,6 +495,7 @@ class DPlayer {
}
switchQuality (index) {
index = typeof index === 'string' ? parseInt(index) : index;
if (this.qualityIndex === index || this.switchingQuality) {
return;
}