mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-11-04 03:27:14 -05:00 
			
		
		
		
	Fix start time not working when trying to play pristine without success
This commit is contained in:
		
							parent
							
								
									fab2784e16
								
							
						
					
					
						commit
						e06989f2ae
					
				@ -133,9 +133,7 @@ export const TouchControls = ({
 | 
				
			|||||||
					/>
 | 
										/>
 | 
				
			||||||
					<IconButton
 | 
										<IconButton
 | 
				
			||||||
						icon={isPlaying ? Pause : PlayArrow}
 | 
											icon={isPlaying ? Pause : PlayArrow}
 | 
				
			||||||
						onPress={() => {
 | 
											onPress={() => setPlay(!isPlaying)}
 | 
				
			||||||
							console.log("play pressed")
 | 
					 | 
				
			||||||
						setPlay(!isPlaying)}}
 | 
					 | 
				
			||||||
						size={ts(8)}
 | 
											size={ts(8)}
 | 
				
			||||||
						{...common}
 | 
											{...common}
 | 
				
			||||||
					/>
 | 
										/>
 | 
				
			||||||
 | 
				
			|||||||
@ -122,7 +122,7 @@ export const Video = memo(function Video({
 | 
				
			|||||||
	}, [publicProgress]);
 | 
						}, [publicProgress]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const getProgress = useAtomCallback(useCallback((get) => get(progressAtom), []));
 | 
						const getProgress = useAtomCallback(useCallback((get) => get(progressAtom), []));
 | 
				
			||||||
	const oldLinks = useRef(links);
 | 
						const oldLinks = useRef<typeof links | null>(null);
 | 
				
			||||||
	useLayoutEffect(() => {
 | 
						useLayoutEffect(() => {
 | 
				
			||||||
		// Reset the state when a new video is loaded.
 | 
							// Reset the state when a new video is loaded.
 | 
				
			||||||
		setSource((mode === PlayMode.Direct ? links?.direct : links?.hls) ?? null);
 | 
							setSource((mode === PlayMode.Direct ? links?.direct : links?.hls) ?? null);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user