I want to display a type of audio (mp3, ogg, aac e.t.c) while a Web radio station playing. My player code is simple in briefly:
let audio = new Audio;
audio.addEventListener('loadeddata', () => audio.play());
audio.src = 'https://some-radio-station.com/stream';
I found no way to get file or HTTP response metadata using web audio API. May be is possible to load a short part of stream using fetch
?
By the way is there a method to detect audio bitrate too?