owncloud / owncloud/android

Refactor ExoPlayer

Open
#3,144 1 comment 2 reactions 1 assignee View on GitHub

@theScrabi is already working on this.

Since Mar 12, 2021.

Estimation - 5 (L)
Dominant language
Kotlin
Stars
4.2k
Forks
3.1k
Avg merge
1d 12h
Merged PRs (30d)
7

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.