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

[🐞]The element has no supported sources. #7195

Open
wanjohiryan opened this issue Dec 25, 2024 · 0 comments
Open

[🐞]The element has no supported sources. #7195

wanjohiryan opened this issue Dec 25, 2024 · 0 comments
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@wanjohiryan
Copy link

Which component is affected?

Qwik Runtime

Describe the bug

I am trying to play audio on button click. The audio click is working alright, but I am getting this error, each time i click (yet the audio is working fine)

Here is the snippet:

    const audioUrl = new URL('./cash.mp3', import.meta.url).href
    const audio = useSignal<HTMLAudioElement | undefined>()
    //...
    <audio ref={v => audio.value = v} src={audioUrl} autoplay={true} />
      <input
            type="range" id="snap" min={1} max={5} step={1}
            //@ts-expect-error
            onClick$={async (v) => { priceValue.value = Number(v.target?.value) as number; await audio.value?.play() }}
            //@ts-expect-error
            onChange$={(v) => { priceValue.value = Number(v.target?.value) as number; }}
           class="overflow-hidden absolute cursor-pointer z-30 top-0 left-0 opacity-0 h-full w-full"
      />

Reproduction

https://github.com/nestrilabs/nestri/blob/feat/index/apps/www/src/routes/pricing/index.tsx

Steps to reproduce

  1. Get an audio file you want to play locally
  2. Import it as shown above
  3. Try playing it programmatically (without using the native audio controls and all)

System Info

System:
    OS: Linux 5.15 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
    CPU: (4) x64 Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz
    Memory: 920.41 MB / 7.71 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
    bun: 1.1.34 - ~/.bun/bin/bun
  npmPackages:
    typescript: 5.4.5 => 5.4.5

Additional Information

No response

@wanjohiryan wanjohiryan added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant