Giter Site home page Giter Site logo

Comments (4)

phemartin avatar phemartin commented on June 11, 2024 1

@E-Kuerschner getHowl: () => Howl would be fantastic!

The bug I'm running into is that sometimes the audio simply stops playing. Refreshing the page doesn't help replaying the audio. The audio only plays again if the user opens a new tab (which is a pretty bad experience).

Reproducing it is hard because the bug occurs sporadically, which makes it hard to predict when/what is causing it.

This usually occurs when:

  • Streaming audio (~ podcast)
  • HTML5 mode on
  • Long audio (20min or more)
  • High speed (2x or more)

I usually get two errors in my console:

  • HTML5 Audio pool exhausted, returning potentially locked audio object.
  • The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.

I experienced a similar issue with v1, and accessing Howler directly solved it for me. Which is why I'm asking for a direct interface with Howler. But ideally, it wouldn't be necessary if the audio didn't crash.

Hope this is helpful! ✌️

from useaudioplayer.

E-Kuerschner avatar E-Kuerschner commented on June 11, 2024

@phemartin im open to adding an escape hatch method: getHowl: () => Howl for instance, but I do want to resist leaking implementation details beyond that. A goal of mine was to keep the interface abstract so that the implementation could potentially be swapped out in the future. Howler isn't currently being maintained so the life of this library really depends on its revival or switching to something else in the future

from useaudioplayer.

E-Kuerschner avatar E-Kuerschner commented on June 11, 2024

As for the bugs is there something specific that you want to address? If we can create a set of reproducible steps maybe we can do something about it!

from useaudioplayer.

E-Kuerschner avatar E-Kuerschner commented on June 11, 2024

thanks @phemartin! Yeah I agree, going through the Howl object directly kinda defeats the purpose of having a React-hooks based integration all together, but it might be a necessary evil for some cases such as this.

The issues you describe are interesting. Clearly the library is introducing some sort of overhead that doesn't exist with using Howler directly, but what/where this is will be difficult to tray down.

Unfortunately I won't have as much bandwidth for changes as I did earlier this year. If the getHowl change and/or this investigation around the bugs are things you would be interested in writing, I would be happy to look at some PRs.

from useaudioplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.