Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

153
Visualizações
audio tag doen't work in angular, 404 not found error

I have a .wav audio file, I'm testing with simple audio tag, but it doesn't work, it's in my app.component.html

<audio class="col-8" controls="">
  <source src='test.wav' type="audio/wav" />
</audio>

it gives me 404 not found error. Here is a screenshot of firefox console

I put my test.wav file in every directory of the project to avoid path problems and avoid not found, but it didn't help!

I tried the same snippet with online wav file, it works, so I tried the audio tag in a simple html file away from the angular project, it worked, so the problem is not the audio.

Can anyone help?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Have you tried changing the path? I get this problem sometimes when trying to link to a file.

Example:

<audio class="col-8" controls>
 <source src='./test.wav/' type="audio/wav" />
</audio>

Note: You don't need to add the quotation marks after the controls attribute.

about 4 years ago · Juan Pablo Isaza Relatório

0

I put it in assets folder, and make src="assets/filename", it worked.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda