-
Notifications
You must be signed in to change notification settings - Fork 50
currentTime and duration features not working #4
Comments
Hi, Can I see what's the error message like when the app crashed? |
I have also experienced this except the method didnt crash the App. Calling duration/currentTime during playback returns the correct value |
Same thing happened to me, here's the logger output:
|
Any update on this? In the interest of time, I decided to use something else for iOS audio playback but still attempting to use this on Android. Getting the RNAudioStreamer.duration((err, duration) => {
if (err) { console.log('error:', err) }
console.log('duration: ', duration);
}); I'm thinking it may be due to the audio file not being loaded enough to calculate the duration. If I wrap the code above in a setTimeout, and wait a few seconds, it seems to work. Maybe I should hold off on calculating the duration until the status changes from |
@Arkanine this looks like a problem from the audio lib DOUAudioStreamer this modile is based on. |
Hi @victor36max, any update on this? I am using 0.0.7 yet still get negative number for audio duration in Android? |
You need to wait for the status change to 'PLAY/PAUSE' -- then it will give the proper duration of the song. |
@victor36max I have the same problem in Android. On iOS return 0. I created a method called So, what is the best way to use this package? |
Hi,
Looks like currentTime and duration features not working, they return 0. The duration method crash application.
Also would be great to know how to stop the audio?
Tested on
RN 32.1
Android and iOS platforms
The text was updated successfully, but these errors were encountered: