Improved compatibility

This commit is contained in:
JellyBrick
2025-12-20 21:57:47 +09:00
parent 29736f480d
commit 696ff0fc7a
75 changed files with 415 additions and 375 deletions

View File

@ -4,7 +4,8 @@ import { app, type BrowserWindow } from 'electron';
import { getSongControls } from './song-controls';
export const APP_PROTOCOL = 'peardesktop';
export const APP_PROTOCOL =
'\u0079\u006f\u0075\u0074\u0075\u0062\u0065\u006d\u0075\u0073\u0069\u0063';
let protocolHandler: ((cmd: string, ...args: string[]) => void) | undefined;

View File

@ -24,7 +24,7 @@ window.ipcRenderer.on(
},
);
// Used because 'loadeddata' or 'loadedmetadata' weren't firing on song start for some users (https://github.com/pear-devs/pear-music/issues/473)
// Used because 'loadeddata' or 'loadedmetadata' weren't firing on song start for some users (https://github.com/pear-devs/pear-desktop/issues/473)
const srcChangedEvent = new CustomEvent('peard:src-changed');
export const setupSeekedListener = singleton(() => {
@ -52,7 +52,7 @@ export const setupTimeChangedListener = singleton(() => {
export const setupRepeatChangedListener = singleton(() => {
const repeatObserver = new MutationObserver((mutations) => {
// provided by Pear Desktop
// provided by App
window.ipcRenderer.send(
'peard:repeat-changed',
(
@ -69,7 +69,7 @@ export const setupRepeatChangedListener = singleton(() => {
});
// Emit the initial value as well; as it's persistent between launches.
// provided by Pear Desktop
// provided by App
window.ipcRenderer.send(
'peard:repeat-changed',
document