javascript Audio visualisation in Safari not working

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 }

I see CodePen links are not enabled here. I posted on stackoverflow