fix miniProgressBar

This commit is contained in:
Harvey Zack committed 2022-04-27 21:33:48 +08:00
1 parent 64015fcec2
commit 9c5b1cdc4a
3 files changed
+25 -24

No files matched your search

@@ -1,17 +1,17 @@
export default function miniProgressBar(art) {
const { layers } = art;
art.on('ready', () => {
art.layers.add({
name: 'miniProgressBar',
mounted($progressBar) {
art.on('destroy', () => {
$progressBar.style.display = 'none';
});
layers.add({
name: 'miniProgressBar',
mounted($progressBar) {
art.on('destroy', () => {
$progressBar.style.display = 'none';
});
art.on('video:timeupdate', () => {
$progressBar.style.width = `${art.played * 100}%`;
});
},
art.on('video:timeupdate', () => {
$progressBar.style.width = `${art.played * 100}%`;
});
},
});
});
return {