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

web_audio is not part sky_engine #53242

Closed
wants to merge 3 commits into from
Closed

Conversation

rmasarovic
Copy link
Contributor

@rmasarovic rmasarovic commented Aug 16, 2023


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:
  • See our contributor guide for general expectations for PRs.
  • Larger or significant changes should be discussed in an issue before creating a PR.
  • Contributions to our repos should follow the Dart style guide and use dart format.

Note that this repository uses Gerrit for code reviews. Your pull request will be automatically converted into a Gerrit CL and a link to the CL written into this PR. The review will happen on Gerrit but you can also push additional commits to this PR to update the code review.

@google-cla
Copy link

google-cla bot commented Aug 16, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service
Copy link

Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at:

https://dart-review.googlesource.com/c/sdk/+/321340

Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly.

Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR).

Copy link
Member

@mraleph mraleph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you just fix the formatting?


indexed_db_sdk_sources = [
"dart2js/indexed_db_dart2js.dart",
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the new line here and in the svg_sources.gni below (make sure to run gn format ...) on these newly added files.

@sigmundch
Copy link
Member

sigmundch commented Sep 6, 2023

Sorry I'm just noticing this PR.

It may be worth circling back on the conversation about how we want to expose these APIs. I'll add some comments to flutter/flutter#49849 as well, but the quick summary is this:

  • We'd like to use js-interop in the long run. This is important if we want flutter web plug-ins to work both in JavaScript and Web Assembly (dart2wasm doesn't support the dart:html and related libraries).
  • Unlike 3 years ago, today there are packages generated from IDLs that expose web-audio and other APIs directly with JS-interop. The only caveat is that those packages (e.g. package:web) are not stable yet.

So the question is: Do we still make this change today and wait for package:web to become stable? Or do we still ban using these APIs and move start using that package early?

cc @srujzs @eyebrowsoffire @kevmoo

@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/321340 has been updated with the latest commits from this pull request.

1 similar comment
@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/321340 has been updated with the latest commits from this pull request.

@srujzs
Copy link
Contributor

srujzs commented Sep 11, 2023

If we're going to need users to migrate a couple months from now anyways, it makes sense for me to say that we should hold off and have users use package:web/their own interop in the interim.

I don't know what the usage is like for web_audio, but I assume it's significantly lower than dart:html. If there are bugs either because usage is low or because the browsers have changed in the last 6 years, having users deal with debugging that when we're not planning on fixing it is a poor experience.

@mraleph
Copy link
Member

mraleph commented Sep 12, 2023

@sigmundch @srujzs I think it is worth highlighting the following: people can already use these libraries with dart2js and probably with DDC because (last time I checked) Web compilers do not forbid them when compiling Flutter Web apps. It's only analyzer that is complaining that these libraries are unavailable in Flutter because of how SDK is wired up.

@sigmundch
Copy link
Member

Makes sense - I approved the PR in gerrit, so feel free to move forward.

Just wanted to clarify to others on this thread that if you use dart:web_audio, you may find that you will need to migrate to package:web in the future. While dart:web_audio won't be deprecated that quickly, it wont be supported in all scenarios (for example dart2wasm will not support it). If adopting package:web is possible for your use case, I'd recommend giving it a try once it's released with a regular (non beta) version number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants