Skip to content

Fix audio not played before video is received in Chromium - #2035

Merged
nickvergessen merged 1 commit into
masterfrom
fix-audio-not-played-before-video-is-received-in-chromium
Jul 31, 2019
Merged

Fix audio not played before video is received in Chromium#2035
nickvergessen merged 1 commit into
masterfrom
fix-audio-not-played-before-video-is-received-in-chromium

Conversation

@danxuliu

@danxuliu danxuliu commented Jul 23, 2019

Copy link
Copy Markdown
Member

Chromium does not play the audio in a video element before the video is available. Due to this, when the remote peer had audio and video available if both were disabled (for example, when the remote peer has just joined the call) and then the audio was enabled the audio from the remote peer was not heard in Chromium until the video was also enabled. Instead of using a video element for both the audio and the video now an audio element was added to play the audio tracks of the remote stream.

The change is applied to all browsers, though, as using an audio element for the audio tracks makes sense in all of them (even if until now they worked fine except for Chromium).

How to test

  • Create a new public conversation
  • Start a call as the owner in that conversation from a machine with audio and video (or use the fake streams of Firefox, but with a recent Firefox version*)
  • Join the call with a guest using Chromium
  • Enable the audio as the owner

*It seems that old Firefox versions did not even send a black stream until the video was enabled for the first time, so there was no video track and the audio was played without problems in Chromium.

Result with this pull request

The audio from the owner is heard in Chromium.

Result without this pull request

The audio from the owner is not heard in Chromium; if the owner enables the video then the audio is also heard.

Chromium does not play the audio in a video element before the video is
available. Due to this, when the remote peer had audio and video
available if both were disabled (for example, when the remote peer has
just joined the call) and then the audio was enabled the audio from the
remote peer was not heard in Chromium until the video was also enabled.
Instead of using a video element for both the audio and the video now an
audio element was added to play the audio tracks of the remote stream.

The change is applied to all browsers, though, as using an audio element
for the audio tracks makes sense in all of them (even if until now they
worked fine except for Chromium).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added 3. to review bug feature: WebRTC 🚡 WebRTC connection between browsers and/or mobile clients feature: frontend 🖌️ "Web UI" client labels Jul 23, 2019
@danxuliu danxuliu added this to the 💚 Next Major milestone Jul 23, 2019
@danxuliu

Copy link
Copy Markdown
Member Author

/backport to stable16

@nickvergessen nickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

@nickvergessen
nickvergessen merged commit 23f4353 into master Jul 31, 2019
@delete-merged-branch
delete-merged-branch Bot deleted the fix-audio-not-played-before-video-is-received-in-chromium branch July 31, 2019 09:03
@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable16 in #2058

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

Labels

bug feature: frontend 🖌️ "Web UI" client feature: WebRTC 🚡 WebRTC connection between browsers and/or mobile clients

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants