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

[Feature Request] Make Player attached to lifecycle #487

Open
shivamsoods opened this issue May 1, 2020 · 2 comments
Open

[Feature Request] Make Player attached to lifecycle #487

shivamsoods opened this issue May 1, 2020 · 2 comments

Comments

@shivamsoods
Copy link

Feature Request

Despite the player working seamlessly it still goes on playing in the background even when the screen is off. The toro widget container could be attached to the lifecycle of the activity/fragment.

The toro player lifecycle should be attached to the activity/fragment and lifecycle states should decide whether to play or pause or release the player.

I tried to control the playback of the player from the Toro Container from the Activity but I was not able to modify the container in the onPause and onResume state of the activity.

@shivamsoods shivamsoods changed the title Make Player attached to lifecycle [Feature Request] Make Player attached to lifecycle May 1, 2020
@eneim
Copy link
Owner

eneim commented Jun 30, 2020

@shivamsoods You can archive the behavior by manually observing the lifecycle change, and then update the PlayerSelector accordingly: a PlayerSelector that selects nothing if the lifecycle is paused or stopped or anything of your choice, and a default PlayerSelector that selects one player otherwise.

@shivamsoods
Copy link
Author

Okay. I'll try it out and see if i am able to implement it.
Thanks

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

2 participants