Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio not ready for live streams? #3

Open
berkibap opened this issue Jun 9, 2019 · 2 comments
Open

Audio not ready for live streams? #3

berkibap opened this issue Jun 9, 2019 · 2 comments

Comments

@berkibap
Copy link

berkibap commented Jun 9, 2019

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.

@kelvinau
Copy link
Owner

kelvinau commented Jun 9, 2019

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?

@berkibap
Copy link
Author

berkibap commented Jun 9, 2019

$(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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants