mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 13:51:20 -08:00
Refactor Artplayer class to update build timestamp
This commit is contained in:
1 parent
fbfee926ca
commit
0ddb7751a1
4 files changed
+12
-2
No files matched your search
@@ -49,6 +49,9 @@ export default function artplayerPluginHlsControl(option = {}) {
|
||||
art.loading.show = true;
|
||||
art.notice.show = `${title}: ${item.html}`;
|
||||
art.emit('artplayerPluginHlsControl:quality', item);
|
||||
for (let index = 0; index < selector.length; index++) {
|
||||
selector[index].default = selector[index] === item;
|
||||
}
|
||||
return item.html;
|
||||
};
|
||||
|
||||
@@ -124,6 +127,9 @@ export default function artplayerPluginHlsControl(option = {}) {
|
||||
art.loading.show = true;
|
||||
art.notice.show = `${title}: ${item.html}`;
|
||||
art.emit('artplayerPluginHlsControl:audio', item);
|
||||
for (let index = 0; index < selector.length; index++) {
|
||||
selector[index].default = selector[index] === item;
|
||||
}
|
||||
return item.html;
|
||||
};
|
||||
|
||||
@@ -159,9 +165,11 @@ export default function artplayerPluginHlsControl(option = {}) {
|
||||
mounted: (_, setting) => {
|
||||
art.on('artplayerPluginHlsControl:audio', (item) => {
|
||||
setting.tooltip = item.html;
|
||||
|
||||
const element = setting.selector.find(
|
||||
(element) => Number(element.$item?.dataset?.value) === item.value,
|
||||
);
|
||||
|
||||
if (element?.$item) {
|
||||
inverseClass(element.$item, 'art-current');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user