audioMotion-analyzer icon indicating copy to clipboard operation
audioMotion-analyzer copied to clipboard

Support Request: Radio stream wont play.

Open lexterror opened this issue 3 years ago • 2 comments

Hi,

The following stream does not play at all.

http://stream.syntheticfm.com:8040/stream

However it does work with a regular html5 audio player.

Thank you!

lexterror avatar Jan 30 '22 22:01 lexterror

@lexterror I was having this problem too, seems you need to add crossOrigin="anonymous" to the audio element, and only start the analyzer after the audio starts playing, e.g.:

<audio
  ref={audioRef}
  crossOrigin="anonymous"
  onPlay={() => {
    if (!binded) {
      analyzer.connectInput(audioRef.current);
      binded = true;
    }
    analyzer.toggleAnalyzer(true);
  }}
  onPause={() => {
    analyzer.toggleAnalyzer(false);
  }}
/>

TiagoCavalcante avatar Mar 02 '22 17:03 TiagoCavalcante

Maybe related to mixed-content restriction (HTTP x HTTPS). Check the browser console for error messages.

hvianna avatar Mar 23 '22 22:03 hvianna