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,