Skip to content

Conversation

@leszko
Copy link
Contributor

@leszko leszko commented Jun 24, 2025

Description

This PR fixes the issue that the player may not re-render when an error happens. Here's a scenario we encounter in Daydream App:

  1. Effect Store is created with the default params
  2. Error happens, the errorCount is increased to the value of 2, the player is re-rendered as expected
  3. Parent component is re-rendered, which causes the store to re-create, errorCount is again 1
  4. Error happens, the errorCount is increased to the value of 2, the player is not re-rendered, because errorCount has not changed (it is again 2); visually, a users sees a grey screen instead of the stream playback.

This PR fixes this issue, because by having lastError timestamp in the equality function, we will always re-render the player if any error happens.

Side note re point 3: I'm not 100% sure why we re-render the parent component and why it causes the store to be recreated. I see we're re-rendering all the components every 1s, and that causes (sometimes) the store recreation. @junhyr @gioelecerati you may have some ideas here.

Additional Information

@leszko leszko requested a review from a team as a code owner June 24, 2025 09:09
@vercel
Copy link

vercel bot commented Jun 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
coinbase-lvpr-tv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 9:09am
lvpr-tv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 9:09am
ui-kit-docs-embed ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 9:09am
ui-kit-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 9:09am
ui-kit-next-pages ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 9:09am
ui-kit-with-pubnub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 9:09am

@leszko
Copy link
Contributor Author

leszko commented Jun 26, 2025

There are some CI failures but they are unrelated to this PR

@leszko leszko merged commit 18d6448 into main Jun 26, 2025
24 of 38 checks passed
@leszko leszko deleted the rafal/fix-playback-issue branch June 26, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants