移除大部分异步操作

This commit is contained in:
Harvey Zack committed 2018-11-28 13:15:45 +08:00
1 parent 3fb41eedf7
commit 450e4ac879
8 files changed
+82 -90

No files matched your search

+3 -7
View File
@@ -1,19 +1,15 @@
import { sleep } from './utils';
export default class Storage {
constructor(art) {
this.art = art;
this.storageName = 'artplayer_settings';
sleep().then(() => {
this.init();
});
this.init();
}
init() {
const { player } = this.art;
const { option } = this.art;
const volume = this.get('volume');
if (volume) {
player.volume = volume;
option.volume = volume;
}
}