Audio only plays smoothly when tab is active in Firefox Nightly
ripdog opened this issue · comments
Playing a local flac file, audio is flawless until I switch tab. Afterwards, it skips so badly about 80-90% of the time it is silent. Plays smoothly again the moment I make the flac.js tab active again.
Running: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20130116 Firefox/21.0 ID:20130116031003
Interesting. Confirmed on Firefox Aurora 22.0 on OS X.
Browsers clamp set{Timeout,Interval} to 1s in background tabs so that we can't buffer enough data using the old Audio Data API because it has write limits. We have a workaround for this, where the timer is actually in a worker that communicates the timer hits with the main thread, but apparently even the timers that are in workers get clamped now.
I'd say the most rational thing to do right now is nothing. No point in figuring out yet another hack to temporarily fix an API that is deprecated and will be replaced soon.
Oh and thanks for reporting, @ripdog !
Hey, thanks for responding! I wasn't sure there was anyone really watching
this project anymore! You said that the Audio Data API is getting replaced
soon, what's replacing it?
On Fri, Jan 18, 2013 at 6:10 PM, Jussi Kalliokoski <notifications@github.com
wrote:
Oh and thanks for reporting, @ripdog https://github.com/ripdog !
—
Reply to this email directly or view it on GitHubhttps://github.com/ofmlabs/flac.js/issues/3#issuecomment-12408073.
@ripdog The Web Audio API. The Firefox guys are going full speed ahead implementing this stuff: https://bugzilla.mozilla.org/show_bug.cgi?id=779297 and WebKit already has an experimental implementation as well.
You can try out the current Firefox implementation by heading to about:config and setting the flag "media.webaudio.enabled" to true, then just create a new mozAudioContext(). Not sure if it can produce any actual sound yet.
So the API Mozilla was trumpeting a few months ago was their own
'standard', which is now being replaced with the W3C version?
On Fri, Jan 18, 2013 at 6:19 PM, Jussi Kalliokoski <notifications@github.com
wrote:
@ripdog https://github.com/ripdog The Web Audio APIhttps://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html.
The Firefox guys are going full speed ahead implementing this stuff:
https://bugzilla.mozilla.org/show_bug.cgi?id=779297 and WebKit already
has an experimental implementation as well.You can try out the current Firefox implementation by heading to
about:config and setting the flag "media.webaudio.enabled" to true, then
just create a new mozAudioContext(). Not sure if it can produce any actual
sound yet.—
Reply to this email directly or view it on GitHubhttps://github.com/ofmlabs/flac.js/issues/3#issuecomment-12408224.
@ripdog Well, they haven't exactly trumpeted the API, it was deprecated more than a year ago. ^^ But something like that.
Also, this is somewhat the same bug as ofmlabs/aurora.js#13
Oh, just my temporal memory playing tricks on me again. (I remember a very
trumpety Mozilla Hacks article not that long ago). Does this mean you have
plans to port flac.js (and the others, I guess) to the new API? And will
the new API alleviate the limits which cause this bug?
On Fri, Jan 18, 2013 at 6:25 PM, Jussi Kalliokoski <notifications@github.com
wrote:
@ripdog https://github.com/ripdog Well, they haven't exactly trumpeted
the API, it was deprecated more than a year ago. ^^ But something like that.Also, this is probably a duplicate of ofmlabs/aurora.js#13https://github.com/ofmlabs/aurora.js/issues/13
—
Reply to this email directly or view it on GitHubhttps://github.com/ofmlabs/flac.js/issues/3#issuecomment-12408317.
Closing this. Firefox supports the Web Audio API now, and is generally more stable.