mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
Improved compatibility
This commit is contained in:
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user