mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
fix media session setting toggle for web
This commit is contained in:
parent
c27b86d2b2
commit
931e96b9d1
1 changed files with 2 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ import { Switch } from '/@/shared/components/switch/switch';
|
|||
|
||||
const isWindows = isElectron() ? window.api.utils.isWindows() : null;
|
||||
const isDesktop = isElectron();
|
||||
const ipc = isElectron() ? window.api.ipc : null;
|
||||
|
||||
export const MediaSessionSettings = () => {
|
||||
const { t } = useTranslation();
|
||||
|
|
@ -19,7 +20,7 @@ export const MediaSessionSettings = () => {
|
|||
function handleMediaSessionChange() {
|
||||
const current = mediaSession;
|
||||
toggleMediaSession();
|
||||
window.api.ipc.send('settings-set', { property: 'mediaSession', value: !current });
|
||||
ipc?.send('settings-set', { property: 'mediaSession', value: !current });
|
||||
}
|
||||
|
||||
const mediaSessionOptions: SettingOption[] = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue