cloudflare / cloudflare/stream-react

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

オープン
#87 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
198
フォーク
30
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず src/useIframeSrc.tsx の53-59行付近を読み、特に issue で説明されている useMemo の動作を確認します。src と併せて Stream コンポーネントの poster prop を変更してケースを再現し、URL が変わったときに表示される poster が更新されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。