Relax setTimeout throttling in background tabs when an AudioContext is present, rather than only when audio is playing

RESOLVED FIXED in Firefox 51

Status

()

Core
DOM
RESOLVED FIXED
a year ago
5 months ago

People

(Reporter: mystor, Assigned: mystor)

Tracking

({dev-doc-complete})

unspecified
mozilla51
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
See bug 1181073 comment 30 through 32 for an explanation as to why this may be necessary.
(Assignee)

Comment 1

a year ago
Created attachment 8777901 [details] [diff] [review]
Relax setTimeout throttling in background tabs when an AudioContext is present, rather than only when audio is playing
Attachment #8777901 - Flags: review?(bkelly)

Updated

a year ago
Attachment #8777901 - Flags: review?(bkelly) → review+

Comment 2

a year ago
Pushed by michael@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cc55edd1533d
Relax setTimeout throttling in background tabs when an AudioContext is present, rather than only when audio is playing, r=bkelly

Comment 3

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cc55edd1533d
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
(Assignee)

Comment 4

a year ago
Did this fix your problems with webaudio in background tabs?
Flags: needinfo?(sole)
I will need to wait until it's in Nightly to test...
Flags: needinfo?(sole)
(Assignee)

Comment 6

a year ago
(In reply to Soledad Penades [:sole] [:spenades] from comment #5)
> I will need to wait until it's in Nightly to test...

This was landed 5 days ago, I think it's in nightly by now.
Flags: needinfo?(sole)
I’ve done doc updates in tandem with bug 1181073 for this (mentioning the difference between Firefox 50 and 51 but writing them up together).
Keywords: dev-doc-complete
:mystor - I am deeply sorry that I just realised this needinfo was here. I tested this and it's still not quite as I think it should be. The rhythm keeps missing notes, but I was expecting it to keep playing as normal when in the background as the audiocontext is [should be?] active.

I realise you probably have other things in mind right now, but as an audio-on-the-web-interested-person I would love to see if there's a way this can be improved. I promise to be more needinfo-aware next time!

Apologies again! I'm truly sorry.
Flags: needinfo?(sole) → needinfo?(michael)

Comment 9

5 months ago
We recently changed some thing in FF55 beta and FF56 nightly.  Do those behave any differently for you?
Flags: needinfo?(sole)
What did you change? What difference should I see? I tested today using Nightly, that's where I saw the 'not quite right' behaviour that I described in comment 8.
Flags: needinfo?(sole)

Comment 11

5 months ago
Can you describe the test steps you are using?
Flags: needinfo?(sole)
Sure!

- I am going to http://sole.github.io/test_cases/web_audio/settimeout/
- Click play
- Change to another tab so this one goes to the background

I'd expect the sound to keep playing smoothly as it is when in the foreground, but notes are skipped and so the beat is not OK
Flags: needinfo?(sole)

Comment 13

5 months ago
I can reproduce.  I'm going to file a new bug.

Updated

5 months ago
Depends on: 1375119
Thank you, Ben. Very appreciated considering the Quantum workload!
(Assignee)

Comment 15

5 months ago
Sounds like Ben has this under control :). Clearing needinfo.
Flags: needinfo?(michael)
You need to log in before you can comment on or make changes to this bug.