BetterVideoPlayer icon indicating copy to clipboard operation
BetterVideoPlayer copied to clipboard

[Request/Discussion] Could the play button be moved into the middle of the VideoPlayer?

Open autovalue opened this issue 8 years ago • 4 comments

Most android users are familiar with the YouTube video player's layout.

The current design with the small play button on the left is something YouTube/Android has moved away from over the years.

What are your thoughts on this?

autovalue avatar Apr 14 '17 19:04 autovalue

Recently, I moved play button into the middle position in my projects where I use BetterVideoPlayer. However, those use cases also include back and forward buttons. Do you have any mock-up or suggestion on how we can make it look "not weird" without adding new buttons.

It is also possible to decouple controls from BetterVideoPlayer view. However, that defeats the purpose of this library in my opinion.

halilozercan avatar Apr 15 '17 08:04 halilozercan

I moved play button into the middle position in my projects where I use BetterVideoPlayer.

How did you go about doing this? Extending the View or manually inflating views into the player?

However, those use cases also include back and forward buttons. Do you have any mock-up or suggestion on how we can make it look "not weird" without adding new buttons.

I'm not quite sure how it'd look, but this doesn't look too bad imo.

It is also possible to decouple controls from BetterVideoPlayer view. However, that defeats the purpose of this library in my opinion.

I guess it depends on what you mean by "defeats the purpose of the library". Libraries are meant to allow as much composition/flexibility as possible without compromising the core functionality of the library - e.g. ExoPlayer, Retrofit, OkHttp, Picasso all have their core functionality, but provide developers with the ability to easily add functionality via composition.

Just off the top of my head, users may inflate their own control layout into BetterVideoPlayer's RelativeLayout, and then pass in an interface which returns each controls, e.g:

interface BetterPlayerControls {
    SeekBar seekbar()
    TextView currentTimeTextView()
    TextView elapsedTimeTextView()
    View playButton()
    View nextButton()
    View prevButton()
}

But this is another set of complexity, which I'm not sure you're prepared to add into the library.

In short, I really like the library, but I'm just looking for the easiest way to change the layout and add custom functionality (e.g. fullscreen icon on the right/change video quality).

FYI: To go along with the theme of better flexibility, it would be awesome if the View exposed the Toolbar via a getter so people can add custom back icons/behaviour to it.

autovalue avatar Apr 15 '17 10:04 autovalue

How did you go about doing this? Extending the View or manually inflating views into the player?

I simply modified the library code in other projects. I'm going to incorporate those modifications into official library release in the near future.

Also moving play button into the middle of screen will take a bit more time because the way ControlsLayout defined in the library is not suitable for this kind of change right now.

"defeats the purpose of the library"

You are right about this topic. I only visioned a simple library where it can satisfy popular use cases in under 10 LOCs. However, this is not a barrier to make it more extensible like making toolbar accessible, adding a new API to insert new buttons besides seekbar.

halilozercan avatar Apr 19 '17 05:04 halilozercan

I simply modified the library code in other projects. I'm going to incorporate those modifications into official library release in the near future.

Glad to hear that.

I only visioned a simple library where it can satisfy popular use cases in under 10 LOCs.

TBH, it's your library and you have the right to the vision of what you want with the library. I just wanted to know if it was something you saw in the pipeline of the library's future, and if not I was willing to either fork it and do my own stuff/try and reimplement it using Exoplayer.

autovalue avatar Apr 20 '17 21:04 autovalue