build all packages

This commit is contained in:
Harvey Zack committed 2019-04-19 09:56:19 +08:00
1 parent 48436c008d
commit 87d068dd68
18 files changed
+95 -14

No files matched your search

@@ -0,0 +1,36 @@
export default function miniProgressBar(art) {
const {
layers,
player,
option: { theme },
} = art;
layers.add({
style: {
display: 'none',
position: 'absolute',
left: 0,
right: 0,
bottom: 0,
height: '3px',
background: theme,
},
mounted($progressBar) {
art.on('hoverenter', () => {
$progressBar.style.display = 'none';
});
art.on('hoverleave', () => {
if (player.playing) {
$progressBar.style.display = 'block';
}
});
art.on('video:timeupdate', () => {
$progressBar.style.width = `${player.played * 100}%`;
});
},
});
return {
name: 'miniProgressBar',
};
}