cloudflare / cloudflare/stream-react

poster prop is not declarative (does not update poster when URL changes)

Aperta
#87 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
198
Fork
30
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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 `` 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:
https://github.com/cloudflare/stream-react/blob/fda143fde6e235706ae14afc9dc919a11374c15b/src/useIframeSrc.tsx#L53-L59

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 :)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo src/useIframeSrc.tsx intorno alle righe 53-59, in particolare il comportamento di useMemo descritto nell’issue. Riproduci il caso modificando la prop poster del componente Stream insieme a src, quindi verifica che il poster visualizzato si aggiorni quando cambia l’URL.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.