Skip to content

[web] HTMLAudioElement() produces "TypeError: Illegal constructor" #139125

Closed
@ryanheise

Description

@ryanheise

Is there an existing issue for this?

Steps to reproduce

Run the code sample below.

Expected results

No error.

Actual results

I get the following error:

TypeError: Illegal constructor

Code sample

Code sample
import 'package:web/helpers.dart';

void main() {
  AudioElement();
}

Screenshots or Video

No response

Logs

Logs
flutter pub add web
flutter run -d chrome

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.16.1, on macOS 13.6.1 22G313 darwin-x64, locale en-AU)
    • Flutter version 3.16.1 on channel stable at /Volumes/Samsung_T5/opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7f20e5d18c (14 hours ago), 2023-11-27 09:47:30 -0800
    • Engine revision 22b600f240
    • Dart version 3.2.1
    • DevTools version 2.28.3

[✗] Android toolchain - develop for Android devices
    ✗ ANDROID_HOME = /Users/ryan/opt/android-sdk
      but Android SDK not found at this location.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.13.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] Connected device (3 available)
    • macOS (desktop)        • macos                                    • darwin-x64     • macOS 13.6.1 22G313 darwin-x64
    • Chrome (web)           • chrome                                   • web-javascript • Google Chrome 119.0.6045.159

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions