mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 04:51:06 +02:00
temporarily remove old player implementations to prevent broken app
This commit is contained in:
@@ -3,7 +3,7 @@ import { BrowserWindow, globalShortcut, systemPreferences } from 'electron';
|
||||
import { isMacOS, isWindows } from '../../../utils';
|
||||
import { store } from '../settings';
|
||||
|
||||
import { PlaybackType } from '/@/shared/types/types';
|
||||
import { PlayerType } from '/@/shared/types/types';
|
||||
|
||||
export const enableMediaKeys = (window: BrowserWindow | null) => {
|
||||
if (isMacOS()) {
|
||||
@@ -26,9 +26,9 @@ export const enableMediaKeys = (window: BrowserWindow | null) => {
|
||||
}
|
||||
|
||||
const enableWindowsMediaSession = store.get('mediaSession', false) as boolean;
|
||||
const playbackType = store.get('playbackType', PlaybackType.WEB) as PlaybackType;
|
||||
const playbackType = store.get('playbackType', PlayerType.WEB) as PlayerType;
|
||||
|
||||
if (!enableWindowsMediaSession || !isWindows() || playbackType !== PlaybackType.WEB) {
|
||||
if (!enableWindowsMediaSession || !isWindows() || playbackType !== PlayerType.WEB) {
|
||||
globalShortcut.register('MediaStop', () => {
|
||||
window?.webContents.send('renderer-player-stop');
|
||||
});
|
||||
|
||||
+3
-3
@@ -38,7 +38,7 @@ import {
|
||||
} from './utils';
|
||||
import './features';
|
||||
|
||||
import { PlaybackType, TitleTheme } from '/@/shared/types/types';
|
||||
import { PlayerType, TitleTheme } from '/@/shared/types/types';
|
||||
|
||||
export default class AppUpdater {
|
||||
constructor() {
|
||||
@@ -549,9 +549,9 @@ async function createWindow(first = true): Promise<void> {
|
||||
}
|
||||
|
||||
const enableWindowsMediaSession = store.get('mediaSession', false) as boolean;
|
||||
const playbackType = store.get('playbackType', PlaybackType.WEB) as PlaybackType;
|
||||
const playbackType = store.get('playbackType', PlayerType.WEB) as PlayerType;
|
||||
const shouldDisableMediaFeatures =
|
||||
!isWindows() || !enableWindowsMediaSession || playbackType !== PlaybackType.WEB;
|
||||
!isWindows() || !enableWindowsMediaSession || playbackType !== PlayerType.WEB;
|
||||
if (shouldDisableMediaFeatures) {
|
||||
app.commandLine.appendSwitch(
|
||||
'disable-features',
|
||||
|
||||
Reference in New Issue
Block a user