mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
移除大部分异步操作
This commit is contained in:
1 parent
3fb41eedf7
commit
450e4ac879
8 files changed
+82
-90
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user