mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-11 22:06:17 -08:00
add Artplayer.PROGRESS_HEIGHT
This commit is contained in:
1 parent
6f94ebade3
commit
3d72f2d95f
7 files changed
+26
-10
No files matched your search
@@ -47,12 +47,21 @@ export default function progress(options) {
|
||||
const $indicator = query('.art-progress-indicator', $control);
|
||||
const $tip = query('.art-progress-tip', $control);
|
||||
|
||||
const {
|
||||
PROGRESS_HEIGHT,
|
||||
INDICATOR_SIZE,
|
||||
INDICATOR_SIZE_ICON,
|
||||
INDICATOR_SIZE_MOBILE,
|
||||
INDICATOR_SIZE_MOBILE_ICON,
|
||||
} = art.constructor;
|
||||
|
||||
setStyle($control, 'height', `${PROGRESS_HEIGHT}px`);
|
||||
setStyle($played, 'backgroundColor', 'var(--theme)');
|
||||
|
||||
let indicatorSize = art.constructor.INDICATOR_SIZE;
|
||||
let indicatorSize = INDICATOR_SIZE;
|
||||
|
||||
if (icons.indicator) {
|
||||
indicatorSize = art.constructor.INDICATOR_SIZE_ICON;
|
||||
indicatorSize = INDICATOR_SIZE_ICON;
|
||||
append($indicator, icons.indicator);
|
||||
} else {
|
||||
setStyles($indicator, {
|
||||
@@ -61,9 +70,9 @@ export default function progress(options) {
|
||||
}
|
||||
|
||||
if (isMobile) {
|
||||
indicatorSize = art.constructor.INDICATOR_SIZE_MOBILE;
|
||||
indicatorSize = INDICATOR_SIZE_MOBILE;
|
||||
if (icons.indicator) {
|
||||
indicatorSize = art.constructor.INDICATOR_SIZE_MOBILE_ICON;
|
||||
indicatorSize = INDICATOR_SIZE_MOBILE_ICON;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user