kelvinau/circular-audio-wave

Audio not ready for live streams?

Opened this issue · 2 comments

Hi,
title says it all i assume. When I try to load a live stream (radio) it says audio not ready, can you provide a fix for this?
Thanks.

I didn't test this on live stream radio, and it's possible that it is not supported now, because this library analyzes the whole audio patterns first to calculate the pace. Can you provide the code sample of your usage?

$(document).ready(() => {
    if(readCookie('visualizerEnabled') === true) {
        let wave = new CircularAudioWave(document.getElementById('visualizer'));
		wave.loadAudio('https://radioserver.wearebounce.net/radio/8000/radio.mp3?type=http&nocache=47214');
		wave.play();
        $('.enableVisualizer').click(() => {
            console.log('disabled visualizer');
            createCookie('visualizerEnabled', false, 150);
            location.reload();
            
        })
    }
    else {
        createCookie('visualizerEnabled', false, 150);
        $('.enableVisualizer').click(() => {
            createCookie('visualizerEnabled', true,150);
            let wave = new CircularAudioWave(document.getElementById('visualizer'));
			wave.loadAudio('https://radioserver.wearebounce.net/radio/8000/radio.mp3?type=http&nocache=47214');
			wave.play();
        })
    }
  
})

(readCookie, createCookie are defined and jquery is included in page)