This commit is contained in:
zhw2590582 committed 2019-05-09 21:18:12 +08:00
1 parent 3f33e98421
commit 88067817cd
18 files changed
+35 -40

No files matched your search

@@ -10,13 +10,13 @@ Backlight plugin for ArtPlayer
Install with `npm`
```
```bash
$ npm install artplayer-plugin-backlight
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-plugin-backlight
```
+2 -2
View File
@@ -10,13 +10,13 @@ Blur plugin for ArtPlayer
Install with `npm`
```
```bash
$ npm install artplayer-plugin-blur
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-plugin-blur
```
+2 -2
View File
@@ -9,13 +9,13 @@ Danmuku plugin for ArtPlayer
Install with `npm`
```
```bash
$ npm install artplayer-plugin-danmuku
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-plugin-danmuku
```
@@ -151,13 +151,12 @@ export default class Danmuku {
});
this.queue
.filter(danmu => {
return (
.filter(
danmu =>
player.currentTime + 0.1 >= danmu.time &&
danmu.time >= player.currentTime - 0.1 &&
danmu.$state === 'wait'
);
})
danmu.$state === 'wait',
)
.forEach(danmu => {
danmu.$ref = getDanmuRef(this.queue);
this.$danmuku.appendChild(danmu.$ref);
@@ -78,9 +78,7 @@ export default function getDanmuTop(ins, danmu) {
const right = playerData.width - left - width;
return { top, left, height, width, right };
})
.sort((prev, next) => {
return prev.top - next.top;
});
.sort((prev, next) => prev.top - next.top);
if (danmus.length === 0) {
return marginTop;
+2 -2
View File
@@ -10,13 +10,13 @@ Gif plugin for ArtPlayer, use [gifshot](https://github.com/yahoo/gifshot) as a d
Install with `npm`
```
```bash
$ npm install artplayer-plugin-gif
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-plugin-gif
```
+2 -2
View File
@@ -10,13 +10,13 @@ Playlist plugin for ArtPlayer
Install with `npm`
```
```bash
$ npm install artplayer-plugin-playlist
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-plugin-playlist
```
+2 -2
View File
@@ -10,13 +10,13 @@ React Component for Artplayer, It is recommended to package itself according to
Install with `npm`
```
```bash
$ npm install artplayer-react
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-react
```
+2 -2
View File
@@ -10,13 +10,13 @@ Danmu plugin for ArtPlayer
Install with `npm`
```
```bash
$ npm install artplayer-plugin-github
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-plugin-github
```
+2 -2
View File
@@ -10,13 +10,13 @@ thumbnail tool for ArtPlayer
Install with `npm`
```
```bash
$ npm install artplayer-tool-thumbnail
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-tool-thumbnail
```
+2 -2
View File
@@ -10,13 +10,13 @@ Vue Component for Artplayer, It is recommended to package itself according to ac
Install with `npm`
```
```bash
$ npm install artplayer-vue
```
Or install with `yarn`
```
```bash
$ yarn add artplayer-vue
```
-1
View File
@@ -1,4 +1,3 @@
# ArtPlayer
[README.md](https://github.com/zhw2590582/ArtPlayer)
@@ -24,8 +24,8 @@ export default function screenshotMix(art, player) {
});
Object.defineProperty(player, 'getScreenshotBlobUrl', {
value: () => {
return new Promise((resolve, reject) => {
value: () =>
new Promise((resolve, reject) => {
try {
const canvas = document.createElement('canvas');
canvas.width = $video.videoWidth;
@@ -38,8 +38,7 @@ export default function screenshotMix(art, player) {
notice.show(error);
reject(error);
}
});
},
}),
});
Object.defineProperty(player, 'screenshot', {
+1 -1
View File
@@ -173,7 +173,7 @@ export default class Artplayer {
* Custom icon
*/
icons?: {
[propName: string]: string
[propName: string]: string;
};
/**