mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-23 15:26:42 +01:00
fix: a few playback and home recommendation issues
Fixed the home recommendation display to use proper images. Fixed an issue for the subtitles background rendering Fixed playback resume from position Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
This commit is contained in:
@@ -543,11 +543,6 @@ export default function page() {
|
||||
],
|
||||
);
|
||||
|
||||
/** Gets the initial playback position in seconds. */
|
||||
const _startPosition = useMemo(() => {
|
||||
return ticksToSeconds(getInitialPlaybackTicks());
|
||||
}, [getInitialPlaybackTicks]);
|
||||
|
||||
/** Build video source config for MPV */
|
||||
const videoSource = useMemo<MpvVideoSource | undefined>(() => {
|
||||
if (!stream?.url) return undefined;
|
||||
@@ -1104,6 +1099,13 @@ export default function page() {
|
||||
applySubtitleSettings();
|
||||
}, [isVideoLoaded, settings]);
|
||||
|
||||
// Seek to resume position after file is loaded (MPV_EVENT_FILE_LOADED)
|
||||
useEffect(() => {
|
||||
if (!tracksReady || !videoRef.current) return;
|
||||
const ticks = getInitialPlaybackTicks();
|
||||
videoRef.current?.seekTo?.(ticksToSeconds(ticks));
|
||||
}, [tracksReady, getInitialPlaybackTicks]);
|
||||
|
||||
// Apply initial playback speed when video loads
|
||||
useEffect(() => {
|
||||
if (!isVideoLoaded || !videoRef.current) return;
|
||||
|
||||
Reference in New Issue
Block a user