Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OfflineAudioContext#resume is available on Firefox #6733

Closed
saschanaz opened this issue Sep 19, 2020 · 7 comments
Closed

OfflineAudioContext#resume is available on Firefox #6733

saschanaz opened this issue Sep 19, 2020 · 7 comments
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@saschanaz
Copy link
Contributor

@foolip, mdn-bcd-collector currently says both AudioContext.resume and OfflineAudioContext.resume are available on Firefox but actually they are from BaseAudioContext. Should it check their existence by hasOwnProperty?

(Chrome somehow does have separate AudioContext.resume and OfflineAudioContext.resume 🤔)

@foolip
Copy link
Collaborator

foolip commented Sep 22, 2020

@saschanaz mdn-bcd-collector is intentionally using more lax tests like 'foo' in Bar.prototype, closer to the feature detection a web developer might use. In fact, where possible we'd like to test instances and not prototypes, and the current test for AudioContext.resume is:

(function () {
var instance = new (window.AudioContext || window.webkitAudioContext)();
return 'resume' in instance;
})();

The reason for this is that there are so many little mishaps in implementations and differences in which prototype things live on that ultimately don't matter to the question "can I use this?"

However, sometimes a situation like this warrants a note. Currently we don't discover the situation automatically, but we could: foolip/mdn-bcd-collector#523

@foolip
Copy link
Collaborator

foolip commented Sep 22, 2020

As for AudioContext#resume and OfflineAudioContext#resume, both exist in the spec:
https://webaudio.github.io/web-audio-api/#AudioContext
https://webaudio.github.io/web-audio-api/#OfflineAudioContext

If Firefox has put these on BaseAudioContext, I don't think that really matters to web developers, right?

@saschanaz
Copy link
Contributor Author

saschanaz commented Sep 22, 2020

Ah cool, let's mark the OfflineAudioContext one as supported in Firefox and I'll be good then.

@saschanaz saschanaz changed the title AudioContext#resume should be moved to OfflineAudioContext#resume OfflineAudioContext#resume is available on Firefox Sep 22, 2020
@foolip
Copy link
Collaborator

foolip commented Sep 24, 2020

@vinyldarkscratch https://mdn-bcd-collector.appspot.com/tests/api/OfflineAudioContext says this is supported in Firefox, and I made an attempt to quickfix, but ran into foolip/mdn-bcd-collector#531. This is probably not an isolated problem, so would you be able to self-assign both this and that issue, and use this as the example to prove it working better?

@foolip
Copy link
Collaborator

foolip commented Sep 24, 2020

With the fixes in foolip/mdn-bcd-collector#532 the update script does set OfflineAudioContext#resume to added in Firefox 40. @vinyldarkscratch I won't send a PR for just one entry, can you bake that into a larger PR fixing things with Web Audio?

@Elchi3
Copy link
Member

Elchi3 commented Mar 28, 2022

This looks fixed to me. Please reopen if not.

@Elchi3 Elchi3 closed this as completed Mar 28, 2022
@foolip
Copy link
Collaborator

foolip commented Mar 29, 2022

Yep, the data was updated in #14291.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

No branches or pull requests

4 participants