mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
prevent mpv from reinitializing on volume, speed, and transcoding
This commit is contained in:
@@ -123,7 +123,12 @@ export const MpvPlayerEngine = (props: MpvPlayerEngineProps) => {
|
||||
isInitializedRef.current = false;
|
||||
hasPopulatedQueueRef.current = false;
|
||||
};
|
||||
}, [mpvExtraParameters, mpvProperties, speed, transcode, volume]);
|
||||
// Note: volume, speed, and transcode are intentionally not in dependencies.
|
||||
// Volume and speed changes are handled by separate useEffects below to avoid
|
||||
// reinitializing the entire player. Transcode changes are handled by queue
|
||||
// update callbacks in usePlayerEvents.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [mpvExtraParameters, mpvProperties]);
|
||||
|
||||
// Update volume
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user