Skip to content

Conversation

@danxuliu
Copy link
Member

When getting the user media for the first time both audio and video are requested. If video is not available then the user media is got again requesting only audio. However, as the media constraints were reused in any following user media request as soon as video failed once it was never requested again. Therefore if a camera was plugged in later it was ignored until Talk was restarted.

Now getting the user media always tries first with both audio and video and then fallbacks to trying only with audio, even if video was not available in a previous request.

Besides that, now an error message is shown to the user if the video could not be got (except if the reason is that there is no camera).

How to test (scenario 1)

  • Start a call without a camera
  • Leave the call
  • Plug in the camera (and wait a little so the browser finds it)
  • Start a call again

Result with this pull request

The camera is available in the call.

Result without this pull request

The camera is not available in the call.

How to test (scenario 2)

  • Start a call with a camera that can not be used

Result with this pull request

The camera is not available in the call, but an error is shown to the user.

Result without this pull request

The camera is not available in the call and no error is shown to the user.

danxuliu added 3 commits July 16, 2020 12:40
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When getting the user media for the first time both audio and video are
requested. If video is not available then the user media is got again
requesting only audio. However, as the media constraints were reused in
any following user media request as soon as video failed once it was
never requested again. Therefore if a camera was plugged in later it was
ignored until Talk was restarted.

Now getting the user media always tries first with both audio and video
and then fallbacks to trying only with audio, even if video was not
available in a previous request.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The error is shown only if there was an actual error when getting the
video; it is not shown if there is simply no camera, or if neither audio
nor video could be got (as there was already a different toast in place
in that case).

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

/backport to stable19

@danxuliu
Copy link
Member Author

/backport to stable18

@nickvergessen
Copy link
Member

I never so far saw the fixup bot failing... there is a first time for everything :D

@nickvergessen nickvergessen merged commit 4e0d60f into master Jul 17, 2020
@nickvergessen nickvergessen deleted the do-not-reuse-media-constraints-between-independent-media-requests branch July 17, 2020 11:28
@backportbot-nextcloud
Copy link

The backport to stable18 failed. Please do this backport manually.

@danxuliu
Copy link
Member Author

Backport to stable18 will probably work once #3899 is merged.

@danxuliu
Copy link
Member Author

I just made the backport to stable18 and I will rebase #3899 on top of it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants