google / google/ExoPlayer

Need a callback for "on just before position discontinuity frame"?

Open
#6,576 17 comments 0 reactions 1 assignee Claimed by @tonihei View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### Searched documentation and issues
https://exoplayer.dev/playlists.html

### Question
`onPositionDiscontinuity` is dispatched apparently after the first frame of the "next video" is already rendered. I am making a "playlist" of videos whose position on screen and size can change per video. The problem with waiting for the first frame of the next video is that I see the "next video" with the wrong size and potentially wrong position for a moment before I can correct it. I cannot seem to get to an event _just before_ the first frame of the "next video" is rendered so that it will look right. (I'm using OpenGL with a surface view used by the ExoPlayer).

Is this currently possible?

Or, would I need to dig into the source code and add an event for "on just before position discontinuity frame"?

If so, can you provide some easy tips for where I would do that in the code (which functions, code branches, etc.)?

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.