WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
83902
OfflineAudioContext constructor must be exposed for Web Audio API
https://bugs.webkit.org/show_bug.cgi?id=83902
Summary
OfflineAudioContext constructor must be exposed for Web Audio API
Chris Rogers
Reported
2012-04-13 10:38:45 PDT
Internally for our layout tests we use an OfflineAudioContext for offline processing, but this is not yet in the specification. Currently the layout tests overload the "normal" AudioContext constructor as such: context = new webkitAudioContext(2, lengthInSampleFrames, sampleRate); Providing three arguments, then creating an OfflineAudioContext instead of a normal AudioContext. But to expose this as an official part of the spec, I believe it would be better as: context = new OfflineAudioContext(2, lengthInSampleFrames, sampleRate); // but of course for now would have the "webkit" prefix -- webkitOfflineAudioContext This is because it's a different kind of context and we'll need to be careful that the "normal" AudioContext has room to grow with additional constructor arguments that don't clash with the offline ones...
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Carlson
Comment 1
2012-04-13 11:33:58 PDT
If this is just for layout tests, it might be better to add it to the Internals object so it can't be exposed to web content.
Chris Rogers
Comment 2
2012-04-13 11:49:06 PDT
(In reply to
comment #1
)
> If this is just for layout tests, it might be better to add it to the Internals object so it can't be exposed to web content.
Although it is currently used by layout tests, the idea is to provide an official API for it because it's useful and people have been requesting it on the W3C audio list, for example:
http://lists.w3.org/Archives/Public/public-audio/2012AprJun/0024.html
Eric Carlson
Comment 3
2012-04-13 11:55:53 PDT
(In reply to
comment #2
)
> (In reply to
comment #1
) > > If this is just for layout tests, it might be better to add it to the Internals object so it can't be exposed to web content. > > Although it is currently used by layout tests, the idea is to provide an official API for it because it's useful and people have been requesting it on the W3C audio list, for example: >
http://lists.w3.org/Archives/Public/public-audio/2012AprJun/0024.html
Then we should get it into the spec as soon as possible. We should strive to not have web facing API that isn't spec'd because developers will find and use it, which can make it difficult to change things in the future.
Chris Rogers
Comment 4
2012-04-13 11:59:24 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > (In reply to
comment #1
) > > > If this is just for layout tests, it might be better to add it to the Internals object so it can't be exposed to web content. > > > > Although it is currently used by layout tests, the idea is to provide an official API for it because it's useful and people have been requesting it on the W3C audio list, for example: > >
http://lists.w3.org/Archives/Public/public-audio/2012AprJun/0024.html
> > Then we should get it into the spec as soon as possible. > > We should strive to not have web facing API that isn't spec'd because developers will find and use it, which can make it difficult to change things in the future.
I totally agree. I've just made a bunch of fixes to the current editor's draft to address list feedback and will be working on it more today and probably Monday. I hope to present this work to the audio group very soon, hopefully to publish a new working draft.
Chris Rogers
Comment 5
2013-05-10 18:11:01 PDT
Fixed:
http://trac.webkit.org/changeset/137516
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug