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 play/pause button state from player? #456

Open
alexaung opened this issue Jan 9, 2022 · 0 comments
Open

How to get play/pause button state from player? #456

alexaung opened this issue Jan 9, 2022 · 0 comments

Comments

@alexaung
Copy link

alexaung commented Jan 9, 2022

Description

My screen flow is as follow -:
Artist -> Albums -> Playlist.
I have my play list with play/pause button. If user click the play button, player will play the song and play button change to pause button. If user click pause button, player stop playing. So far I can control the player with external button in my playlist.

What I want is that If user click the play or pause button on player, I want to change the button on my playlist.
So how do I get the player's play state?

One more thing, my player is added on app level and my playlist in app route. Meaning to say that playlist and player are not in same page because I don't want player closed when user change to other page. I use createContext to get audioInstance.

Here is the example how add the playlist from different component. I haven't added the my custom playlist yet.

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