-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hello Cloudflare team,
We have a use case where we are using an external 'video picker' list to select a video they want to watch.
Once they click it, we update the props going to the <Stream> component, including the src and poster props.
The src prop seems to take effect, because starting the video does in fact play the selected video, however the poster does not change.
It looks like it's an intended behavior due to the useMemo implementation without dependencies here:
stream-react/src/useIframeSrc.tsx
Lines 53 to 59 in fda143f
| const iframeSrc = useMemo( | |
| () => customerCode ? `https://customer-${customerCode}.cloudflarestream.com/${src}?${paramString}` : `https://iframe.cloudflarestream.com/${src}?${paramString}`, | |
| // we intentionally do NOT include paramString here because we want | |
| // to avoid changing the URL when these options change. Changes to | |
| // these options will instead be handled separately via the SDK. | |
| [] | |
| ); |
Which says you can use the SDK to make the changes... but I don't see how.
Thanks in advance - we're hoping to switch to Stream from a competitor but this is blocking our implementation :)