Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Audio en html5 canvas

New Here ,
Jun 24, 2022 Jun 24, 2022

Cómo puedo trabajar los audios de fondo para un juego en html 5 canvas, linea de tiempo que tiene acciones como stop, le aplico evento pero no se escucha desde el comienzo y cada vez que presiono un botón al inicio se empieza a reproducir, si presiono 3 veces el boton a inicio tengo  la misma canción reproduciendose una sobre la otra.

421
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2022 Jun 25, 2022

your sound can't start until the user interacts (eg, mouse click) with your canvas project.  if that doesn't help you, what code do you have that's used to start your sound?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 25, 2022 Jun 25, 2022

Hola muchas gracias por responder, no le puse ningun código para iniciar, ahora logré que no se reproduzca cada vez que presiono el botón de iniciar, indicandole que se inicie en un fotograma diferente al del inicio del audio (que está como evento). Cuando hago una previsualización funciona bien, pero cuando lo publico en HTML 5 no se escuchan los audios, hasta que presiono el botón iniciar.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2022 Jun 25, 2022

you're welcome.

 

do have any more questions about this?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 28, 2022 Jun 28, 2022

No tengo más preguntas, muchas gracias!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 28, 2022 Jun 28, 2022
LATEST

you're welcome, and good luck with your project!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines