Comments (4)
@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.
@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.
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.
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)
- usePosition doesnt work anymore HOT 3
- starting with empty src loads infinitely HOT 2
- Download audio HOT 1
- Support SSR HOT 6
- `AudioLoadOptions` shape does not correspond Howler constructor options and missing some of them HOT 9
- isLoading boolean HOT 4
- HTML5 Audio pool exhausted, returning potentially locked audio object. Is this because of this library or not? HOT 1
- Error in the Readme, fade arg says second not ms HOT 2
- Finish playing before destroying the sound currently playing HOT 2
- Inconsistencies on lock screen controls when playing in background on iOS HOT 2
- Audio not changing when recording is different but link is same HOT 4
- useGlobalAudioPlayer and useAudioPlayer seems to mix up their states HOT 4
- How to adjust the audio playback progress ? HOT 1
- Upgrade Howler
- Refactor state management to decouple from Howler
- Refactor to use React.useSyncExternalStore
- playback speed sounds like a chipmunk HOT 1
- Audio playback stops when safari unfocused on ios HOT 1
- Host package on JSR
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from useaudioplayer.