Skip to content

Fix RemoteVideoBlocker still active after removing its associated model#9125

Merged
nickvergessen merged 1 commit intomasterfrom
fix-remotevideoblocker-still-active-after-the-callparticipantmodel-is-removed
Mar 22, 2023
Merged

Fix RemoteVideoBlocker still active after removing its associated model#9125
nickvergessen merged 1 commit intomasterfrom
fix-remotevideoblocker-still-active-after-the-callparticipantmodel-is-removed

Conversation

@danxuliu
Copy link
Member

How to test (scenario 1)

  • Setup the HPB
  • Start a call with video enabled
  • In a private window, join the call
  • Open the browser console
  • Leave the call

Result with this pull request

No error is printed in the console

Result without this pull request

Ignore unknown error (and, if expanded, client_not_found - No MCU client found to send message to) is printed (after 5 seconds) in the console

How to test (scenario 2)

  • Setup the HPB
  • Start a call with video enabled
  • In a private window, join the call
  • Open the browser console
  • Leave the call
  • Quickly join the call again (before 5 seconds have elapsed)

Result with this pull request

The remote video works as expected

Result without this pull request

The remote video freezes

Once a CallParticipantModel is removed its associated RemoteVideoBlocker
should no longer block the remote video. Otherwise a deferred blocking
would be rejected by the HPB, as the remote peer is no longer available
or, even worse, it could be accepted and block the video of the remote
peer if it joined again since the original model was removed.

To solve that now the RemoteVideoBlocker is destroyed once its
associated model is removed, which causes the RemoteVideoBlocker to
ignore any further call on its methods. Note that the RemoteVideoBlocker
reference can not be nullified instead on the shared datas, as other
components, like the VideoView, expect a RemoteVideoBlocker to be always
available in its shared data. Internally ignoring further calls also
makes the code more robust than just externally guarding any possible
call.

Signed-off-by: Daniel CalviΓ±o SΓ‘nchez <[email protected]>
@danxuliu
Copy link
Member Author

/backport to stable26

@danxuliu
Copy link
Member Author

/backport to stable25

@danxuliu
Copy link
Member Author

/backport to stable24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants