mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
fix mpv volume on initial startup
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
usePlayerData,
|
usePlayerData,
|
||||||
usePlayerMuted,
|
usePlayerMuted,
|
||||||
usePlayerProperties,
|
usePlayerProperties,
|
||||||
|
usePlayerStore,
|
||||||
usePlayerVolume,
|
usePlayerVolume,
|
||||||
} from '/@/renderer/store';
|
} from '/@/renderer/store';
|
||||||
import { PlayerStatus } from '/@/shared/types/types';
|
import { PlayerStatus } from '/@/shared/types/types';
|
||||||
@@ -108,6 +109,7 @@ export function MpvPlayer() {
|
|||||||
},
|
},
|
||||||
onPlayerStatus: async (properties) => {
|
onPlayerStatus: async (properties) => {
|
||||||
const status = properties.status;
|
const status = properties.status;
|
||||||
|
const volume = usePlayerStore.getState().player.volume;
|
||||||
if (audioFadeOnStatusChange) {
|
if (audioFadeOnStatusChange) {
|
||||||
if (status === PlayerStatus.PAUSED) {
|
if (status === PlayerStatus.PAUSED) {
|
||||||
fadeAndSetStatus(volume, 0, PLAY_PAUSE_FADE_DURATION, PlayerStatus.PAUSED);
|
fadeAndSetStatus(volume, 0, PLAY_PAUSE_FADE_DURATION, PlayerStatus.PAUSED);
|
||||||
|
|||||||
Reference in New Issue
Block a user