E-Kuerschner / useAudioPlayer

React hooks for controlling audio on the web
MIT License
315 stars 35 forks source link

Case insensitive formats #107

Open xivilai opened 1 year ago

xivilai commented 1 year ago

Some radio station APIs return formats (.mp3, aac, ...) in upper case. Because of this, the player get stuck on infinite loading with no apparent reason. Takes a while to figure out the problem

Steps to reproduce:

useAudioPlayer({
    src: "https://stream.toohotradio.net/128",
    html5: true,
    format: ["MP3"],
  });
E-Kuerschner commented 1 year ago

@xivilai ill make sure to transform all formats to lowercase just in case, but for the meantime could you not do the same in your app as a workaround?

xivilai commented 1 year ago

@E-Kuerschner I did, thank you