tcking / GiraffePlayer2

out of the box android video player(support lazy load, ListView/RecyclerView and hight performance)
Apache License 2.0
377 stars 110 forks source link

Override media controller #97

Open lintax opened 6 years ago

lintax commented 6 years ago

Currently it is quite easy to customize the player on the level of DefaultMediaController (almost anything is protected) and BaseMediaController

However, the VideoView itself is bind to a single implementation, so requires a copy-paste of it + impossibility to reuse BaseMediaController or it's implementation due to fact that BaseMediaController.bind is binded to VideoView class itself.

So the solution is to allow to allow another child of VideoView to create a different instance of BaseMediaController

szymanskip commented 6 years ago

I did something similar with #87 That solution doesn't require you to override VideoView

lintax commented 6 years ago

Yes, I've seen that. However you do extra inflate that adds a slowdowns - you first inflate, bind, then unbind and inflate your own version of the control view. Creating a custom VideoView does not add any runtime cost.