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

Example on Web crashes when trying to play audio #240

Closed
sgehrman opened this issue Nov 12, 2023 · 0 comments
Closed

Example on Web crashes when trying to play audio #240

sgehrman opened this issue Nov 12, 2023 · 0 comments

Comments

@sgehrman
Copy link

Package version
latest

Environment
Chrome Linux

Describe the bug

Example crashes on web when you click Play

  void downloadWebData(String path) {
    // Simple download code for web testing
    final anchor = html.document.createElement('a') as html.AnchorElement
      ..href = path
      ..style.display = 'none'
      ..download = 'audio.wav';
    html.document.body!.children.add(anchor);
    anchor.click();
    html.document.body!.children.remove(anchor);
    html.Url.revokeObjectUrl(path);     <<<=========  works if this is commented out
  }

To Reproduce

Just run the example on web, record then play

Steps to reproduce the behavior:
do the thing

Expected behavior

should not crash

Additional context

Add any other context about the problem here.

problem is here:
html.Url.revokeObjectUrl(path);

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

No branches or pull requests

1 participant