mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 13:21:20 -08:00
fix miniProgressBar
This commit is contained in:
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 {
|
||||
|
||||
Reference in new issue
Block a user