Skip to content

Support Renderers that don't consume tracks #3212

@pakerfeldt

Description

@pakerfeldt

Previously with ExoPlayer 1 we were using two custom Renderers. One for showing debug information overlaid on top of the surface and another one to periodically report back to a listener when 15s of media was played. Both of them, well at least the latter, not really a Renderer per se but it felt pretty clean, we didn't need to periodically poll the position and we didn't need to manage any additional threads.

With ExoPlayer 2 we run into some difficulties trying to maintain this approach. There are no Formats in the MediaPeriod associated with these Renderers so they are not returned by DefaultTrackSelector. I suppose we could implement our own DefaultTrackSelector and return these two Renderers when needed but this leads me to the question whether or not this is a bad approach? Sure, we could go the same approach as DebugTextViewHelper for our first use case even though I prefer to view it as a Renderer and handle it accordingly. But what about the other use case of reporting back whenever (roughly) 15s of media has been played. What would be your recommended way of dealing with that?

Thoughts and comments much appreciated.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions