mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 02:43: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
|
|
@ -1,7 +1,7 @@
|
|||
import { useCallback } from 'react';
|
||||
import isElectron from 'is-electron';
|
||||
import styled from 'styled-components';
|
||||
import { useSettingsStore } from '/@/renderer/store/settings.store';
|
||||
import { usePlaybackType, useSettingsStore } from '/@/renderer/store/settings.store';
|
||||
import { PlaybackType } from '/@/renderer/types';
|
||||
import { AudioPlayer } from '/@/renderer/components';
|
||||
import {
|
||||
|
|
@ -64,6 +64,7 @@ const remote = isElectron() ? window.electron.remote : null;
|
|||
export const Playerbar = () => {
|
||||
const playersRef = PlayersRef;
|
||||
const settings = useSettingsStore((state) => state.playback);
|
||||
const playbackType = usePlaybackType();
|
||||
const volume = useVolume();
|
||||
const player1 = usePlayer1Data();
|
||||
const player2 = usePlayer2Data();
|
||||
|
|
@ -96,7 +97,7 @@ export const Playerbar = () => {
|
|||
<RightControls />
|
||||
</RightGridItem>
|
||||
</PlayerbarControlsGrid>
|
||||
{settings.type === PlaybackType.WEB && (
|
||||
{playbackType === PlaybackType.WEB && (
|
||||
<AudioPlayer
|
||||
ref={playersRef}
|
||||
autoNext={autoNextFn}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue