RelistenNet / gapless.js

Gapless audio playback javascript plugin (for seamless audio playback)
https://relisten.net
MIT License
12 stars 2 forks source link

Status of the issues #14

Open spinitron opened 4 years ago

spinitron commented 4 years ago

In the relisten-web repo there are these comments

  // if we're on mobile, disable web audio
  // if we're on firefox, disable web audio/gapless
  // gapless doesn't work on firefox & its been causing a ton of issues
  // disable for everyone until I can inspect the issue again...

which correspond approx to issues in the gapless.js tracker.

How do you feel about gapless.js since then? Have these problems gotten any better with newer browsers? Do you still think Web Audio API is at all promising?

switz commented 4 years ago

It's certainly promising, but it seems to go through a cyclical nature of working perfectly and not working based on new versions of browsers coming out. I need to sit down and do a full audit of what's working properly and what's not, especially on mobile and Firefox.

I've always felt like this library had potential and many use-cases, but no one externally ever showed much interest. If you want to give it a whirl and find out what's working and not, I'm happy to work with you and improve it as much as possible.

If you'd rather wait, I can get back to you when I get a chance to look into it.

Glad to see someone showing some interest, would be curious to see what you find.

spinitron commented 4 years ago

We started using gapless.js last week experimentally to put playback of past radio shows on Spinitron. For example on https://spinitron.com/WZBC/pl/11493983/Juvert-Jams press the play triangle button above the program title. The audio is in 5-minute chunks so there's a transition from one "track" to the next every 5 minutes.

I disabled Web Audio. For me it works, but not quite gapless. It's a but lumpy at the transitions. I've only tried Firefox on Windows 10 so far. Web testing across browsers and platforms is sooo time consuming.

I wondered about implementing progressive download in our script, converting the downloaded data to a series of data: URIs so that the HTML audio element doesn't have to deal with network URLs.

switz commented 4 years ago

First off, that's awesome! Glad to see it being utilized on another site. So cool.

It definitely won't be gapless if you disable web audio, as that's the only way for it to actually be gapless. But there's only a slight blip, as you've noticed. So essentially, you're largely just using it as a simple audio manager, not taking advantage of the gapless features, which is totally fine and reasonable.

I'll look into generating data URIs, that's a great idea. If you come up with anything, let me know.

spinitron commented 4 years ago

I disabled Web Audio partly because of those comments quoted above. I don't recall why else. There was a lot going on in that original hack session. I'll try again with Web Audio.

spinitron commented 4 years ago

We've been trialing a service with 10 radio stations for more than a week now using gapless.js 1.0.0 unmodified. Most of the time with Web Audio turned off. I tried enabling Web Audio (the only change was removing .disableWebAudio()) for a couple of days and the results were not acceptable. People described chunks of the programming being lost.

So far we have no telemetry systematic browser testing. I expect we're going to dive into the gapless.js code and the APIs it uses soon.