mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
add themeMix
This commit is contained in:
1 parent
59400eb3bf
commit
1438ce5e82
16 files changed
+428
-410
No files matched your search
@@ -13,15 +13,16 @@ export function getPosFromEvent(art, event) {
|
||||
return { second, time, width, percentage };
|
||||
}
|
||||
|
||||
export default function progress(option) {
|
||||
export default function progress(options) {
|
||||
return (art) => {
|
||||
const {
|
||||
option: { highlight, theme },
|
||||
events: { proxy },
|
||||
icons,
|
||||
option,
|
||||
events: { proxy },
|
||||
} = art;
|
||||
|
||||
return {
|
||||
...option,
|
||||
...options,
|
||||
html: `
|
||||
<div class="art-control-progress-inner">
|
||||
<div class="art-progress-loaded"></div>
|
||||
@@ -39,7 +40,7 @@ export default function progress(option) {
|
||||
const $indicator = query('.art-progress-indicator', $control);
|
||||
const $tip = query('.art-progress-tip', $control);
|
||||
|
||||
setStyle($played, 'backgroundColor', theme);
|
||||
setStyle($played, 'backgroundColor', 'var(--theme)');
|
||||
|
||||
let indicatorSize = 14;
|
||||
if (icons.indicator) {
|
||||
@@ -47,7 +48,7 @@ export default function progress(option) {
|
||||
append($indicator, icons.indicator);
|
||||
} else {
|
||||
setStyles($indicator, {
|
||||
backgroundColor: theme,
|
||||
backgroundColor: 'var(--theme)',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -95,7 +96,7 @@ export default function progress(option) {
|
||||
}
|
||||
}
|
||||
|
||||
highlight.forEach((item) => {
|
||||
option.highlight.forEach((item) => {
|
||||
const left = (clamp(item.time, 0, art.duration) / art.duration) * 100;
|
||||
append(
|
||||
$highlight,
|
||||
|
||||
Reference in new issue
Block a user