From b6febbb1852298b227e3da51840b25e1f1bee3df Mon Sep 17 00:00:00 2001 From: Kevin Kipp Date: Fri, 7 Mar 2025 11:32:06 -0600 Subject: [PATCH] Default to undefined for currentTime This was preventing startTime from being respected --- src/Stream.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Stream.tsx b/src/Stream.tsx index bd2889e..a69ac00 100644 --- a/src/Stream.tsx +++ b/src/Stream.tsx @@ -19,10 +19,10 @@ import { validSrcUrl } from "./validSrcUrl"; function useProperty( name: Key, ref: RefObject, - value: T[Key] + value: T[Key] | undefined ) { useEffect(() => { - if (!ref.current) return; + if (!ref.current || value === undefined) return; const el = ref.current; el[name] = value; }, [name, value, ref]); @@ -104,7 +104,7 @@ export const StreamEmbed: FC = ({ height, width, poster, - currentTime = 0, + currentTime, volume = 1, playbackRate = 1, startTime,