Fix start time not working when trying to play pristine without success

This commit is contained in:
Zoe Roux 2024-01-31 12:35:28 +01:00
parent fab2784e16
commit e06989f2ae
2 changed files with 2 additions and 4 deletions

View File

@ -133,9 +133,7 @@ export const TouchControls = ({
/>
<IconButton
icon={isPlaying ? Pause : PlayArrow}
onPress={() => {
console.log("play pressed")
setPlay(!isPlaying)}}
onPress={() => setPlay(!isPlaying)}
size={ts(8)}
{...common}
/>

View File

@ -122,7 +122,7 @@ export const Video = memo(function Video({
}, [publicProgress]);
const getProgress = useAtomCallback(useCallback((get) => get(progressAtom), []));
const oldLinks = useRef(links);
const oldLinks = useRef<typeof links | null>(null);
useLayoutEffect(() => {
// Reset the state when a new video is loaded.
setSource((mode === PlayMode.Direct ? links?.direct : links?.hls) ?? null);