Skip to content

Conversation

@danxuliu
Copy link
Member

@danxuliu danxuliu commented Jun 2, 2021

Note that enable and disable a device refers to switching audio and video between none and a specific device in Talk settings, not to enable and disable audio and video in the controls.

The issues are there also in previous Talk versions. However one of the fixes requires a new endpoint to update the call flags (updating the call flags when a device is disabled), and currently it is just an aesthetic issue (in the future it might be needed to grant and revoke publishing permissions without having to force a reconnection), so (for once :-P ) I would vote to not backport it.

How to test (scenario 1)

  • Do not set up the HPB
  • Open Talk settings, enable the audio device and disable the video device
  • Start a call
  • Open the Network tab in the developer console
  • Open Talk settings and enable the video device

Result with this pull request

The join call endpoint is called with flags = 7 (in call, audio and video)

Result without this pull request

The join call endpoint is called without flags (in the participant list the video icon will be shown just for sheer luck, as the server sets the default flags, which happen to be 7, when none is given)

How to test (scenario 2)

  • Set up the HPB
  • Open Talk settings, enable the audio device and disable the video device
  • Start a call
  • Open Talk settings and enable the video device

Result with this pull request

In the participant list the video icon is shown for the current participant

Result without this pull request

In the participant list the audio icon is shown for the current participant

How to test (scenario 3)

  • Open Talk settings, enable the audio device and the video device
  • Start a call
  • Open Talk settings and disable the video device

Result with this pull request

In the participant list the audio icon is shown for the current participant

Result without this pull request

In the participant list the video icon is shown for the current participant

How to test (scenario 4)

  • Open Talk settings, enable the audio device and the video device
  • Start a call
  • Open Talk settings
  • Enable and disable the video device a few times

Result with this pull request

In the participant list the audio or video icon is shown depending on the case for the current participant

Result without this pull request

In the participant list the video icon is shown for the current participant

@nickvergessen
Copy link
Member

in the participant list the video icon will be shown just for sheer luck, as the server sets the default flags, which happen to be 7, when none is given

Btw definition is not sheer luck :P

danxuliu added 4 commits June 7, 2021 14:19
The current call flags were not given in forced reconnections with the
internal signaling server, so the server used the default flags (audio
and video).

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When a media device is enabled during a call a new track is added to the
already existing peers, which requires a renegotiation. As proper
renegotiation is not implemented yet right now a forced reconnection is
used instead.

In forced reconnections the participant leaves and joins the
conversation again, which by default kept the same call flags as before.
Now the call flags are updated as needed.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The call flags are updated when joining and leaving a call. However,
during a call the audio and video devices can be disabled without
needing a reconnection, so an endpoint to just update the call flags is
also needed.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When a media device is disabled during a call its track is replaced with
a null track in the peers, and if a media device is reenabled the null
track is replaced with the new track. In both cases neither a
renegotiation nor a reconnection is needed. Therefore the call flags
have to be explicitly updated.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu force-pushed the fix-call-flags-updates branch from 4a79cd7 to 7936dab Compare June 7, 2021 12:35
@nickvergessen nickvergessen merged commit 554cb76 into master Jun 7, 2021
@nickvergessen nickvergessen deleted the fix-call-flags-updates branch June 7, 2021 13:04
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