移除大部分异步操作

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

+2 -4
View File
@@ -1,4 +1,4 @@
import { clamp, sleep } from '../utils';
import { clamp } from '../utils';
export default function attrInit(art, player) {
const {
@@ -25,7 +25,5 @@ export default function attrInit(art, player) {
$video.autoplay = option.autoplay;
}
sleep().then(() => {
player.attachUrl(option.url);
});
player.attachUrl(option.url);
}