Library assumes audioEl.current to always exist, which if kinda fine in sync scenario, but in async scenario, like in setListenTrack method - rarely, but it can cause error when trying to access property of null, for example, our sentry not very often but sometimes spits Cannot read property 'currentTime' of null from aforementioned method.
Possible solution is to change parameter of ref of audioEl to HTMLAudioElement | null which seems more correct react-wise, than just HTMLAudioElement.
Library assumes
audioEl.current
to always exist, which if kinda fine in sync scenario, but in async scenario, like in setListenTrack method - rarely, but it can cause error when trying to access property of null, for example, our sentry not very often but sometimes spitsCannot read property 'currentTime' of null
from aforementioned method.Possible solution is to change parameter of ref of audioEl to
HTMLAudioElement | null
which seems more correct react-wise, than justHTMLAudioElement
.I'll try to fix and PR this.