mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
build all packages
This commit is contained in:
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',
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user