Prevent Media Session Handling on MPV (#1212)

* Remove MediaSession Handling on MPV

* Add playbackType to config.json for Main Thread Access

* Disabling settings without Hiding
This commit is contained in:
Xudong Zhou
2025-11-02 09:26:16 +08:00
committed by GitHub
parent 0ca9eb0fcd
commit 829c27a5e9
5 changed files with 24 additions and 7 deletions
+4 -2
View File
@@ -38,7 +38,7 @@ import {
} from './utils';
import './features';
import { TitleTheme } from '/@/shared/types/types';
import { PlaybackType, TitleTheme } from '/@/shared/types/types';
export default class AppUpdater {
constructor() {
@@ -549,7 +549,9 @@ async function createWindow(first = true): Promise<void> {
}
const enableWindowsMediaSession = store.get('mediaSession', false) as boolean;
const shouldDisableMediaFeatures = !isWindows() || !enableWindowsMediaSession;
const playbackType = store.get('playbackType', PlaybackType.WEB) as PlaybackType;
const shouldDisableMediaFeatures =
!isWindows() || !enableWindowsMediaSession || playbackType !== PlaybackType.WEB;
if (shouldDisableMediaFeatures) {
app.commandLine.appendSwitch(
'disable-features',