chore: improve readability

This commit is contained in:
Su-Yong
2025-10-12 14:28:29 +09:00
parent 4f716d8e0b
commit ffa61687bf
137 changed files with 2625 additions and 2626 deletions

View File

@ -1,7 +1,7 @@
import { createPlugin } from '@/utils';
import { t } from '@/i18n';
import type { YoutubePlayer } from '@/types/youtube-player';
import type { MusicPlayer } from '@/types/music-player';
export default createPlugin({
name: () => t('plugins.exponential-volume.name'),
@ -12,7 +12,7 @@ export default createPlugin({
},
renderer: {
onPlayerApiReady(playerApi) {
const syncVolume = (playerApi: YoutubePlayer) => {
const syncVolume = (playerApi: MusicPlayer) => {
if (playerApi.getPlayerState() === 3) {
setTimeout(() => syncVolume(playerApi), 0);
return;
@ -21,8 +21,8 @@ export default createPlugin({
playerApi.setVolume(playerApi.getVolume());
};
// "YouTube Music fix volume ratio 0.4" by Marco Pfeiffer
// https://greasyfork.org/en/scripts/397686-youtube-music-fix-volume-ratio/
// "fix volume ratio 0.4" by Marco Pfeiffer
// https://bit.ly/4nMu2WF
// Manipulation exponent, higher value = lower volume
// 3 is the value used by pulseaudio, which Barteks2x figured out this gist here: https://gist.github.com/Barteks2x/a4e189a36a10c159bb1644ffca21c02a