whereby / sdk

MIT License
12 stars 4 forks source link

browser-sdk: Show placeholder cell when there's no stream #478

Closed thyal closed 1 week ago

thyal commented 1 week ago

Description

Show a placeholder (avatar) when there no stream for a participant in the video grid. Kind of an edge case since isVideoEnabled needs to be true as well, but we had a report for this from a customer.

Summary:

Related Issue:

Testing

I couldn't reproduce this just by blocking media permissions (isVideoEnabled would be false). I created a patch to verify though, and this can be used to test:

  1. On main: Save this snippet as tmp_no_stream.patch, and apply it git apply tmp_no_stream.patch

diff --git a/packages/core/src/redux/slices/remoteParticipants.ts b/packages/core/src/redux/slices/remoteParticipants.ts index 3d1d9de9..2a7a835a 100644 --- a/packages/core/src/redux/slices/remoteParticipants.ts +++ b/packages/core/src/redux/slices/remoteParticipants.ts @@ -25,7 +25,8 @@ function createRemoteParticipant(client: SignalClient, newJoiner = false): Remot return { ...rest, stream: null,

  1. Run yarn build && yarn dev
  2. Go to the Video Grid UI story, and join the same room in another tab
  3. Verify that you see an empty cell next to the local participant cell.
  4. Checkout this branch and apply the patch again
  5. Go to the Video Grid UI story, and join the same room in another tab
  6. Verify that you now see an avatar for the remote participant.

Screenshots/GIFs (if applicable)

before image

after image

Checklist

Additional Information

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: eaacf54e880fba910c94733ca4e6b7a69ca05648

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------------------ | ----- | | @whereby.com/browser-sdk | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR