Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get audio completion callback in react native? #19

Open
Hassaan-Xeverse opened this issue Mar 29, 2023 · 0 comments
Open

how to get audio completion callback in react native? #19

Hassaan-Xeverse opened this issue Mar 29, 2023 · 0 comments

Comments

@Hassaan-Xeverse
Copy link

useEffect(() => {
setupPlayer().then(()=>{
load();

})

const subscription = addEventListener("media", function (event: string) {
  // handle event
  console.log("from event listener", event);
  if (event == "skip_to_next") {
    pause();
  } else if (event == "skip_to_previous") {
    //skipToPrevious();
  } else if (event == "completed") {
   // skipToNext();
  } else {
   // updateStatus();
  }
});


working for android not for ios?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant