-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
[REQUIRED] Searched documentation and issues
- Github, Stack Overflow, exoplayer.dev, ExoPlayer Javadoc
- https://exoplayer.dev/listening-to-player-events.html#player-state-changes
[REQUIRED] Question
I did some testing in the sample app, to figure out when sound was actually heard/outputted. It seems to me that onPlayerStateChanged() with STATE_READY and/or isPlaying() callbacks are received before sound can actually be heard. This is especially noticeable when we increase the AudioTrack buffer, where the aforementioned callbacks can be received up to 500 ms before actual sound can be heard(depending on the buffer size). While this is easiest seen with a bigger buffer, it is also happening with the default settings, making our metrics for startup time incorrect.
My experience is that sound is actually heard when the AudioTrack fills up its buffer(for the first time).
Is my assumption correct?
If so, does it make sense to create some kind of callback isSoundOutputted() to better give us the true startup time of an asset?
Note: If this is true, then the information in https://exoplayer.dev/listening-to-player-events.html#player-state-changes is ambiguous, depending on what "immediately play" means in this context: "Player.STATE_READY: The player is able to immediately play from its current position."
A full bug report captured from the device
N/A
Link to test content
Play whatever content you want.