mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
fix video:ratechange
This commit is contained in:
1 parent
ff54b34275
commit
5898dad3d7
4 files changed
+10
-8
No files matched your search
@@ -24,8 +24,10 @@ export default function playbackRate(option) {
|
||||
mounted: ($panel) => {
|
||||
const $default = query('[data-value="1"]', $panel);
|
||||
if ($default) inverseClass($default, 'art-current');
|
||||
art.on('playbackRate', (value) => {
|
||||
const $current = queryAll('span', $panel).find((item) => Number(item.dataset.value) === value);
|
||||
art.on('video:ratechange', () => {
|
||||
const $current = queryAll('span', $panel).find(
|
||||
(item) => Number(item.dataset.value) === art.playbackRate,
|
||||
);
|
||||
if ($current) {
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user