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

Add 'resize mode' toggle to PlayerControlView #228

Open
warren-bank opened this issue Dec 17, 2022 · 3 comments
Open

Add 'resize mode' toggle to PlayerControlView #228

warren-bank opened this issue Dec 17, 2022 · 3 comments

Comments

@warren-bank
Copy link

The layout for PlayerControlView already includes an ImageButton to cycle through values in PlayerView.setRepeatToggleModes(int) .. passing each to Player.setRepeatMode(int); this UI is enabled by default.

I would request that, similarly, an ImageButton be added to this layout.. to cycle through the constant values in AspectRatioFrameLayout.. passing each to PlayerView.setResizeMode(int).

@icbaker
Copy link
Collaborator

icbaker commented Dec 22, 2022

I believe that exposing a user-facing button to change the resize mode serves a pretty niche use-case (compared to toggling the repeat mode).

It's also likely to be hard to disambguate it visually from a full-screen button (which I suspect is a much more common need) - i.e. what icon would you use?

I think we're unlikely to do this, but I'll leave this open in case it gets further support. Our UI components are not designed to serve every possible use-case, they're intended to work for common playback scenarios and serve as the starting point for people to implement their own UIs that can be customised to their needs (possibly by forking our components): https://exoplayer.dev/ui-components.html#further-customization

@icbaker icbaker changed the title [feature request] add ImageButton to PlayerControlView layout: exo_resize_mode_toggle Add 'resize mode' toggle to PlayerControlView Dec 22, 2022
@warren-bank
Copy link
Author

fair enough..
I just figured it would make sense to provide UI elements for all possible features,
which are (mostly) disabled by default..
and an easy way for the developer to cherry pick which UI elements/features to enable.

with respect to icons that could be used for this particular feature (ie: resize modes)..
I just did a super quick Google image search,
and found a few (with open-source licenses) to share as examples of what I had in mind..

@warren-bank
Copy link
Author

warren-bank commented Dec 22, 2022

a little off-topic..
but relating to resize modes..

I recently added the ability to my player for the user to dynamically change this mode..
and observed very inconsitent behavior for this feature..
so I figured I'd quickly ask if this is (never-the-less) the expected behavior:

  • when the video currently playing is mp4:
    • all modes work as expected
  • when the video currently playing is hls or dash.. or pretty much any other video format:
    • cycling through the resize modes produces absolutely no visual change

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

No branches or pull requests

2 participants