android icon indicating copy to clipboard operation
android copied to clipboard

Refactor ExoPlayer

Open theScrabi opened this issue 4 years ago • 1 comments

The code we use for the video preview is a bit cluttered. So I'd like to propose to refactor it. Here are some suggestions we should apply:

  • The Player view is split up into a PreviewVideoActivity, which is used for full screen playback, and a PreviewVideoFragment which is used for embedded playback. Both share the same code which is redundant and requires communication between both. I suggest to remove the PreviewVideoActivity and try to make the fragment be shown in fullscreen mode if possible.
  • PreviewVideoActivity and PreviewVideoFragment both implement a couple of listeners. This bloats the code size of them both. I'd suggest to "pull" the listener parts out of these classes and make them independent from it.
  • Update to Kotlin. Because while doing that modernizing the code would be a good idea.

I'd also propose to do this before redesigning the player. This way we can make sure our next steps are build on solid ground.

theScrabi avatar Mar 10 '21 09:03 theScrabi

Will need research before.

jesmrec avatar Apr 09 '21 11:04 jesmrec