-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Description
What is the current behavior?
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than react-use
. Paste the link to your JSFiddle or CodeSandbox example below:
In nextjs, i used this hook useAudio with props preload: 'metadata'
, the strange thing is that the state.duration
is always 0.
You can see details in the following sandbox.
https://codesandbox.io/p/devbox/react-use-audio-j7fwpm
What is the expected behavior?
make state.duration normal, it seems that the onDurationChange
event is not trigger because the audio is loaded at early moment which the onDurationChange
event is not added.
A little about versions:
- OS:
- Browser (vendor and version):
- React:
react-use
:- Did this worked in the previous package version?
Metadata
Metadata
Assignees
Labels
No labels