Skip to content

Commit b6febbb

Browse files
committed
Default to undefined for currentTime
This was preventing startTime from being respected
1 parent 0a49847 commit b6febbb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Stream.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import { validSrcUrl } from "./validSrcUrl";
1919
function useProperty<T, Key extends keyof T>(
2020
name: Key,
2121
ref: RefObject<T | undefined>,
22-
value: T[Key]
22+
value: T[Key] | undefined
2323
) {
2424
useEffect(() => {
25-
if (!ref.current) return;
25+
if (!ref.current || value === undefined) return;
2626
const el = ref.current;
2727
el[name] = value;
2828
}, [name, value, ref]);
@@ -104,7 +104,7 @@ export const StreamEmbed: FC<StreamProps> = ({
104104
height,
105105
width,
106106
poster,
107-
currentTime = 0,
107+
currentTime,
108108
volume = 1,
109109
playbackRate = 1,
110110
startTime,

0 commit comments

Comments
 (0)