fix: correct typos in player modules (#969)

This commit is contained in:
Harvey Zhao authored and GitHub committed 2025-06-13 20:31:27 +08:00
1 parent 169c6a318a
commit 078b595819
12 files changed
+39 -39

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
import { append } from '../utils';
export default function pip(option) {
export default function airplay(option) {
return (art) => ({
...option,
tooltip: art.i18n.get('AirPlay'),
+7 -7
View File
@@ -42,7 +42,7 @@ export default function progress(options) {
`,
mounted: ($control) => {
let tipTimer = null;
let isDroging = false;
let isDragging = false;
const $hover = query('.art-progress-hover', $control);
const $loaded = query('.art-progress-loaded', $control);
@@ -95,7 +95,7 @@ export default function progress(options) {
}
function setBar(type, percentage, event) {
const isMobileDroging = type === 'played' && event && isMobile;
const isMobileDragging = type === 'played' && event && isMobile;
if (type === 'loaded') {
setStyle($loaded, 'width', `${percentage * 100}%`);
@@ -110,7 +110,7 @@ export default function progress(options) {
setStyle($indicator, 'left', `${percentage * 100}%`);
}
if (isMobileDroging) {
if (isMobileDragging) {
setStyle($tip, 'display', 'flex');
const width = $control.clientWidth * percentage;
const time = secondToTime(percentage * art.duration);
@@ -170,11 +170,11 @@ export default function progress(options) {
});
proxy($control, 'mousedown', (event) => {
isDroging = event.button === 0;
isDragging = event.button === 0;
});
art.on('document:mousemove', (event) => {
if (isDroging) {
if (isDragging) {
const { second, percentage } = getPosFromEvent(art, event);
art.emit('setBar', 'played', percentage, event);
art.seek = second;
@@ -182,8 +182,8 @@ export default function progress(options) {
});
art.on('document:mouseup', () => {
if (isDroging) {
isDroging = false;
if (isDragging) {
isDragging = false;
}
});
}
+5 -5
View File
@@ -52,23 +52,23 @@ export default function volume(option) {
if (isMobile) {
setStyle($panel, 'display', 'none');
} else {
let isDroging = false;
let isDragging = false;
proxy($slider, 'mousedown', (event) => {
isDroging = event.button === 0;
isDragging = event.button === 0;
art.volume = getVolumeFromEvent(event);
});
art.on('document:mousemove', (event) => {
if (isDroging) {
if (isDragging) {
art.muted = false;
art.volume = getVolumeFromEvent(event);
}
});
art.on('document:mouseup', () => {
if (isDroging) {
isDroging = false;
if (isDragging) {
isDragging = false;
}
});
}