mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
Fallback to web player if mpv fails to run
This commit is contained in:
parent
fb08502e51
commit
9b0c9ba3ac
14 changed files with 115 additions and 70 deletions
|
|
@ -23,6 +23,7 @@ import {
|
|||
} from '/@/renderer/types';
|
||||
import { randomString } from '/@/renderer/utils';
|
||||
import i18n from '/@/i18n/i18n';
|
||||
import { usePlayerStore } from '/@/renderer/store/player.store';
|
||||
|
||||
const utils = isElectron() ? window.electron.utils : null;
|
||||
|
||||
|
|
@ -616,7 +617,16 @@ export const useTableSettings = (type: TableType) =>
|
|||
|
||||
export const useGeneralSettings = () => useSettingsStore((state) => state.general, shallow);
|
||||
|
||||
export const usePlayerType = () => useSettingsStore((state) => state.playback.type, shallow);
|
||||
export const usePlaybackType = () =>
|
||||
useSettingsStore((state) => {
|
||||
const isFallback = usePlayerStore.getState().fallback;
|
||||
|
||||
if (isFallback) {
|
||||
return PlaybackType.WEB;
|
||||
}
|
||||
|
||||
return state.playback.type;
|
||||
});
|
||||
|
||||
export const usePlayButtonBehavior = () =>
|
||||
useSettingsStore((state) => state.general.playButtonBehavior, shallow);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue