Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Simplify NoPlayer Listeners & Forwarders #95

Closed
jonreeve opened this issue Oct 6, 2017 · 1 comment
Closed

Simplify NoPlayer Listeners & Forwarders #95

jonreeve opened this issue Oct 6, 2017 · 1 comment

Comments

@jonreeve
Copy link

jonreeve commented Oct 6, 2017

Problem

There are many duplications around all the types of listener. A listener interface for each, a forwarder for each, a "collection of listeners" for each (that has too much logic in it for just that; some track state, etc). The ultimate interface segregation of the listeners is a good aim, but it doesn't justify all this duplication.

Potential Solution

Unify many if not all of these forwarders and listener collections and so on, and simply handle the interface segregation at the outermost layer.

Impact

There's a great cognitive load in following all these listeners and forwarders and how they all interact and which one you're viewing at any moment because they all look so similar, and there's changes that have been made to one or two but not all, because of the duplication. Simplifying this need not change the outermost interface to this, but would make following and maintaining this code much easier.

@Mecharyry
Copy link
Contributor

Version 2.6.0 of exo-player introduces the abstract class Player.DefaultEventListener which can be used over the more verbose Player.EventListener.

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

No branches or pull requests

3 participants