Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Issue know the current time #23

Open
raouldandresy opened this issue Apr 3, 2018 · 0 comments
Open

Issue know the current time #23

raouldandresy opened this issue Apr 3, 2018 · 0 comments

Comments

@raouldandresy
Copy link

Hi :)
i'm trying to do a progress bar that use the percentage, so i need the duration and the currenti time. But i'm using a while loop that is not working, anyone can help?

_statusChanged(status) {
console.log(status);
RNAudioStreamer.duration((err, duration)=>{
if(!err){
console.log(duration);
this.setState({duration: duration});
} //seconds
})
while(status === 'PLAYING'){
RNAudioStreamer.currentTime((err, currentTime)=>{
if(!err){
console.log(currentTime);
this.setState({currentTime: currentTime});
}//seconds
})
}
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant