Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

132
Vistas
javascript Audio visualisation in Safari not working for internet radio streams (Icecast/shoutcast)

Can anybody help me to check why this code is not working in Safari (osx)? The audio is is playing, but no visualisation. I tried all the hints I found, but still no luck. Need to mention it's working fine in Chrome (osx) Thanks a lot for help

function getDataFromAudio() {
  var freqByteData = new Uint8Array(analyser.fftSize / 2);
  var timeByteData = new Uint8Array(analyser.fftSize / 2);
  analyser.getByteFrequencyData(freqByteData);
  analyser.getByteTimeDomainData(timeByteData);
  return { f: freqByteData, t: timeByteData }; // array of all 1024 levels
}

Codepen

To be more precise, the visualisation and getByteFrequencyData/getByteTimeDomainData does not work for internet radios (Icecast/shoutcast), but works for single remote mp3.

  1. CodePen - audio stream test icecast - not working in Safari
  2. CodePen - audio stream test mp3 - working in Safari
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I think this is actually a bug in Safari.

The analyzer data is all zeroes, which is typical if there's a CORS problem. Yet, I don't see any issue with the response headers from that Icecast stream. Access-Control-Allow-Origin is set to * which is the same as the GitHub.io stream.

The only two meaningful differences in the responses that I see:

  • The MP3 file has the erroneous Content-Type of audio/mp3. (It should be audio/mpeg.)
  • Safari requests ICY-style metadata from the stream.

I suspect Safari is handing the stream off to some other component, and its output cannot be captured with the MediaElementSourceNode.

Though, hopefully I'm wrong, and folks can show a real solution and downvote this answer. :-)

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda