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

No getController() #4385

Closed
dzboot02 opened this issue Jun 14, 2018 · 5 comments
Closed

No getController() #4385

dzboot02 opened this issue Jun 14, 2018 · 5 comments
Assignees

Comments

@dzboot02
Copy link

Simply, how to get the controller from the PlayerView, the controller variable is there privately, but no way to access it.

@ojw28
Copy link
Contributor

ojw28 commented Jun 14, 2018

We could add a getController method if it makes sense to do so, but what's the use case that this would be needed for? Thanks!

@ojw28 ojw28 added the question label Jun 14, 2018
@ojw28 ojw28 self-assigned this Jun 14, 2018
@dzboot02
Copy link
Author

dzboot02 commented Jun 14, 2018

Because of this:

   @Override
   public void onBackPressed() {

      if (playerView.getControllerView().isVisible()) {
         playerView.hideController();
      } else {
         super.onBackPressed();
      }
   }

Hide the controller when users pressed back button and the controller is visible. There is no way to access this method from the playerView. That's where I needed it, for me, maybe other things for other users.

@ojw28
Copy link
Contributor

ojw28 commented Jun 15, 2018

That makes sense; thanks! I think we'd prefer to just expose a PlayerView.isControllerVisible method, or similar. Would that work for you?

@dzboot02
Copy link
Author

Not for me. When I encountered this problem, I just used ExoPlayer locally, and I changed it as I needed.
I don't know if this would be enough, people may need other things in the future, but you do what you have to do for your excellent library to work flawlessly :)

@ojw28
Copy link
Contributor

ojw28 commented Jun 18, 2018

I don't think we want to expose the whole controller through PlayerView. We'll add isControllerVisible for now, which should do what you need.

ojw28 added a commit that referenced this issue Jun 18, 2018
Issue: #4385

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200986828
@ojw28 ojw28 closed this as completed Jun 18, 2018
ojw28 added a commit that referenced this issue Jul 23, 2018
Issue: #4385

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200986828
@google google locked and limited conversation to collaborators Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants