New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 644622 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

AbortError on switching output audio device (setSinkId)

Reported by deukalis...@gmail.com, Sep 7 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.92 Safari/537.36

Example URL:
https://webrtc.github.io/samples/src/content/devices/multi/

Steps to reproduce the problem:
Switching audio devices until AbortError is raised - output device is not switched.

What is the expected behavior?
Using javascript setSinkId on a audio/video element should set sinkId if device is available.

What went wrong?
After switching audio devices AbortError DOMException is raised randomly - unfortunately neither reproduceable when it occures nor what causes the issue.

Did this work before? No 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? N/A 

Chrome version: 53.0.2785.92  Channel: stable
OS Version: Fedora 24
Flash Version: Shockwave Flash 22.0 r0

New Technology, errors were expected for sure :) - hope the information given helps to fix or plan a fallback (switch all audio/video elements back) as it is a real problem if you want to switch e.g. 4 audio elements but only 3 switch - you even cannot fallback as you cannot ensure this works.
 
Screenshot from 2016-09-07 08-43-12.png
66.8 KB View Download
testrtc-2016-09-07T06-47-53.234Z.log
19.7 KB View Download
browser-os-version.log
1.2 KB View Download
Cc: guidou@chromium.org
I can reproduce this on OSX (10.11.6) with Chrome (Version 53.0.2785.116).
Seems to occur more often when the audio element is paused.
Screen Shot 2016-09-20 at 16.12.06.png
554 KB View Download

Comment 3 by guidou@chromium.org, Sep 21 2016

I am able to reproduce on 54.0.2816.0. Will look into it.

Comment 4 by guidou@chromium.org, Sep 21 2016

Cc: -guidou@chromium.org olka@chromium.org
Owner: guidou@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 5 by guidou@chromium.org, Sep 21 2016

Cc: guidou@chromium.org dalecur...@chromium.org
 Issue 629440  has been merged into this issue.

Comment 7 by guidou@chromium.org, Sep 22 2016

Status: Fixed (was: Assigned)
The reason it was failing was that ARMI::SwitchOutputDevice was originally written for the case when sinks were not restartable.

The bug triggered when multiple ARMI::SwitchOutputDevice() calls were made after an ARMI::Stop(). In this case, the first call is saved to be processed until the next Start(), and all subsequent SOD() would trigger AbortError until the first one was processed.
This is why the problem was more reproducible when the media element was paused/stopped.

The fix no longer saves the callback when the ARMI is not running, but instead always gets a mixer for the new device from the pool to make sure the new device is valid. If the ARMI has not started the mixer is returned to the pool.

Comment 8 by guidou@chromium.org, Sep 22 2016

Labels: Merge-Request-54

Comment 9 by dimu@chromium.org, Sep 23 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Could you please confirm whether this change is verified in Canary and safe to merge?If yes, merge your change to M54 (branch: 2840) ASAP, so that we could take this for next Beta Release.
I want to land it on Monday after it has baked in Canary for a few days.
Project Member

Comment 12 by sheriffbot@chromium.org, Sep 26 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 26 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a52359f1f9044d41c191989f405d83a927dcfc8

commit 8a52359f1f9044d41c191989f405d83a927dcfc8
Author: Guido Urdaneta <guidou@chromium.org>
Date: Mon Sep 26 15:25:32 2016

Make ARMI::SwitchOutputDevice work after Stop is called.

BUG= 644622 

Review-Url: https://codereview.chromium.org/2359883002
Cr-Commit-Position: refs/heads/master@{#420269}
(cherry picked from commit 4f36a74f8081e3830a9c9fb48854c1a831cf6086)

Review URL: https://codereview.chromium.org/2373573002 .

Cr-Commit-Position: refs/branch-heads/2840@{#528}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/8a52359f1f9044d41c191989f405d83a927dcfc8/media/base/audio_renderer_mixer_input.cc
[modify] https://crrev.com/8a52359f1f9044d41c191989f405d83a927dcfc8/media/base/audio_renderer_mixer_input.h
[modify] https://crrev.com/8a52359f1f9044d41c191989f405d83a927dcfc8/media/base/audio_renderer_mixer_input_unittest.cc

Cc: rnimmagadda@chromium.org
Labels: Needs-Feedback
@deukalische.flut: Could you please have a look at the attached video and let us know if this is the correct procedure to repro this issue. 

Also, confirm if this is fixed.

Thank you.
644622.ogv
5.6 MB View Download
Ahoi!

On 54.0.2840.41 (linux 64bit) I can not reproduce the error anymore. On versions below to reproduce it's enough to just open the sample page, go to an audio output select field and change it's value (quickly) a few times.

Thank you a lot for fixing this issue this quick, it'll be a helpful feature to our development.

Best wishes!
rnimmagadda@chromium.org: looks perfectly fine now. Thank you a lot!
Labels: TE-Verified-54.0.2840.41 TE-Verified-M54
Thanks for the reply.

Adding the TE_Verified labels.

Verified the fix on Ubuntu Trusty (14.04) for Google Chrome Beta Version - 54.0.2840.41 [Screen-recording is attached in the comment #14]

Thank you.
Labels: -Needs-Feedback
Project Member

Comment 19 by bugdroid1@chromium.org, Oct 27 2016

Sign in to add a comment