mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
Fix eslint
This commit is contained in:
1 parent
ec54a0519d
commit
7d728556c8
5 files changed
+34
-41
No files matched your search
@@ -1,3 +1,3 @@
|
||||
if (typeof window !== "undefined") {
|
||||
require("./bugfix");
|
||||
if (typeof window !== 'undefined') {
|
||||
require('./bugfix');
|
||||
}
|
||||
@@ -1,30 +1,28 @@
|
||||
{
|
||||
"name": "artplayer",
|
||||
"version": "4.3.11",
|
||||
"version": "4.3.12",
|
||||
"expose": "Artplayer",
|
||||
"description": "ArtPlayer.js is a modern and full featured HTML5 video player",
|
||||
"main": "dist/artplayer.js",
|
||||
"types": "types/artplayer.d.ts",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"homepage": "https://artPlayer.org",
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"description": "ArtPlayer.js is a modern and full featured HTML5 video player",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"html5",
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
|
||||
"dependencies": {
|
||||
"option-validator": "^2.0.6",
|
||||
"screenfull": "^6.0.1"
|
||||
},
|
||||
"license": "MIT",
|
||||
"gitHead": "5ea211ef738351668e4acace326af4ff6947e2ee"
|
||||
}
|
||||
@@ -7,14 +7,21 @@ export default class Notice {
|
||||
}
|
||||
|
||||
set show(msg) {
|
||||
const { $player, $noticeInner } = this.art.template;
|
||||
if (!msg) return removeClass($player, 'art-notice-show');
|
||||
$noticeInner.innerText = msg instanceof Error ? msg.message.trim() : msg;
|
||||
addClass($player, 'art-notice-show');
|
||||
clearTimeout(this.timer);
|
||||
this.timer = setTimeout(() => {
|
||||
$noticeInner.innerText = '';
|
||||
const {
|
||||
constructor,
|
||||
template: { $player, $noticeInner },
|
||||
} = this.art;
|
||||
|
||||
if (msg) {
|
||||
$noticeInner.innerText = msg instanceof Error ? msg.message.trim() : msg;
|
||||
addClass($player, 'art-notice-show');
|
||||
clearTimeout(this.timer);
|
||||
this.timer = setTimeout(() => {
|
||||
$noticeInner.innerText = '';
|
||||
removeClass($player, 'art-notice-show');
|
||||
}, constructor.NOTICE_TIME);
|
||||
} else {
|
||||
removeClass($player, 'art-notice-show');
|
||||
}, this.art.constructor.NOTICE_TIME);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user