Skip to content

Conversation

@danxuliu
Copy link
Member

Forced reconnections, which are needed to start sending audio or video if the call was joined without audio or video, do not always work if the HPB is not used. This is unrelated to this pull request and it will be addressed separately.

How to test (scenario 1)

  • Open Talk settings
  • Disable both audio and video
  • Join a call

Result with this pull request

No error is shown, as both devices were explicitly disabled

Result without this pull request

An error about not being able to access microphone nor camera is shown

How to test (scenario 2)

  • Open Talk settings
  • Disable both audio and video
  • Join a call
  • Open Talk settings
  • Select audio and/or video devices

Result with this pull request

In the local video the audio and video buttons are enabled. Clicking on them enables audio and/or video (which requires a reconnection)

Result without this pull request

In the local video the audio and video buttons are kept disabled, so neither audio nor video can be enabled

danxuliu added 2 commits May 24, 2021 21:31
When the call was started without audio nor video (either explicitly or
because there was an error when getting the media) the media device
changes were not listened to, so further device changes were ignored and
"localTrackReplaced" events were not emitted.

Moreover, "localTrackReplaced" events were handled by Peer objects to
replace or add tracks as needed, but if a call is started without media
some Peer objects will be missing (the ownPeer object if the HPB is
used, Peer objects for any other participant that is not sending media
when the HPB is not used). Therefore now a forced reconnection is
triggered when needed to establish the missing sender connections.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
"TypeError" is thrown by "getUserMedia" when requesting media without
audio nor video. In that case no error message should be shown, as the
devices would have been explicitly disabled by the user.

That could also happen when audio was disabled and video was enabled but
failed. If the initial "getUserMedia" call done when starting a call
failed and video was requested it was retried again without video in all
cases. Now it is only retried if audio is also enabled, as otherwise it
would end requesting no audio and no video (and no error message would
be shown, as a "TypeError" would be thrown).

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

/backport to stable21.1

@danxuliu
Copy link
Member Author

/backport to stable20.1

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 tested and works with and without HPB.

You forgot to mention the test case for "started with video" where you disable audio/video again in the settings then reenable, which does not result in a reconnection. That worked as well.

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