add esline

This commit is contained in:
Harvey Zack committed 2018-10-11 12:16:57 +08:00
1 parent 5db0050584
commit 70864abf44
17 files changed
+528 -31

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
export default class Captions {
constructor({ option }) {
//
}
}
+5
View File
@@ -0,0 +1,5 @@
export default class Contextmenu {
constructor({ option }) {
//
}
}
+5
View File
@@ -0,0 +1,5 @@
export default class Controls {
constructor({ option }) {
//
}
}
File renamed without changes.
+5
View File
@@ -0,0 +1,5 @@
export default class Danmu {
constructor({ option }) {
//
}
}
+5
View File
@@ -0,0 +1,5 @@
export default class Events {
constructor({ option }) {
//
}
}
+5
View File
@@ -0,0 +1,5 @@
export default class Hotkey {
constructor({ option }) {
//
}
}
+10 -10
View File
@@ -1,19 +1,19 @@
import ZHCN from "./zh-CN";
import ZHTW from "./zh-TW";
import EN from "./en";
import JP from "./jp";
import ZHCN from './zh-CN';
import ZHTW from './zh-TW';
import EN from './en';
import JP from './jp';
const i18nMap = {
"zh": ZHCN,
"zh-CN": ZHCN,
"zh-TW": ZHTW,
"en": EN,
"jp": JP
zh: ZHCN,
'zh-CN': ZHCN,
'zh-TW': ZHTW,
en: EN,
jp: JP
};
export default class I18n {
constructor({ option }) {
this.language = i18nMap[option.language || "en"];
this.language = i18nMap[option.language] || i18nMap.en;
}
get(key) {
+15 -15
View File
@@ -1,16 +1,15 @@
import "./style/index.scss";
import './style/index.scss';
import Emitter from 'tiny-emitter';
import { verification } from "./utils";
import I18n from "./i18n";
import Player from "./player";
import Controls from "./controls";
import Screenshot from "./screenshot";
import Contextmenu from "./contextmenu";
import Danmu from "./danmu";
import Info from "./info";
import Captions from "./captions";
import Events from "./events";
import Hotkey from "./hotkey";
import { verification } from './utils';
import I18n from './i18n';
import Player from './player';
import Controls from './controls';
import Contextmenu from './contextmenu';
import Danmu from './danmu';
import Info from './info';
import Captions from './captions';
import Events from './events';
import Hotkey from './hotkey';
let id = 0;
export const instances = [];
@@ -24,7 +23,7 @@ class Artplayer extends Emitter {
}
static get version() {
return "__VERSION__";
return '__VERSION__';
}
static get DEFAULTS() {
@@ -40,7 +39,6 @@ class Artplayer extends Emitter {
this.i18n = new I18n(this);
this.player = new Player(this);
this.controls = new Controls(this);
this.screenshot = new Screenshot(this);
this.contextmenu = new Contextmenu(this);
this.danmu = new Danmu(this);
this.captions = new Captions(this);
@@ -50,11 +48,13 @@ class Artplayer extends Emitter {
this.id = id++;
instances.push(this);
console.log(this);
}
destroy() {
this.destroyEvents.forEach(event => event.destroy());
this.refs.container.innerHTML = "";
this.refs.container.innerHTML = '';
}
}
+5
View File
@@ -0,0 +1,5 @@
export default class Info {
constructor({ option }) {
//
}
}
+5
View File
@@ -0,0 +1,5 @@
export default class Player {
constructor({ option }) {
//
}
}
+1
View File
@@ -0,0 +1 @@
export * from './verification';
+3
View File
@@ -0,0 +1,3 @@
export function verification(option) {
//
}
View File
Whitespace-only changes.