Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent currentPosition via MediaBrowser if skip silence is enabled #765

Closed
JureSencar opened this issue Oct 24, 2023 · 1 comment
Closed
Assignees

Comments

@JureSencar
Copy link

JureSencar commented Oct 24, 2023

Version

Media3 1.1.1

Devices that reproduce the issue

Pixel 6a Android 13, but I expect the same on all non-legacy controllers

Reproducible in the demo app?

I did not find any spoken audio files in demo app. Music files do not result in significant skip silence effect. Hence, I could not reproduce that using demo app. But it should be straight forward to test. I find this the bug most obvious when listening to an audiobook at e.g. 2x speed with skip silence turned on.

Expected result

Position would jump according to skipped parts due to skip silence.

Actual result

Position is behaving as if skip silence is not enabled. Only after few seconds it jumps to the correct position.
I guess the issue is that the MediaControllerImplBase:maybeUpdateCurrentPositionMs is making estimations based on the playback speed and time elapsed and there are no updates when skip silence occurs.

The position in the underlying Player does not have the the same issue.

Media

Any speech file that has pauses.

@tianyif
Copy link
Contributor

tianyif commented Oct 30, 2023

@JureSencar, thanks for reporting!

I think your guess is correct, and further, the estimatedPositionMs may be based on the old playerInfo.sessionPositionInfo.positionInfo.positionMs with the elapsedTimeMs and the playbackSpeed, before the sessionPositionInfo is periodically updated to the controller. The update interval is 3s, so I guess that's why you saw it jumped to the correct position after a few seconds.

Anyway, this looks like a bug and we will be providing a solution soon.

copybara-service bot pushed a commit that referenced this issue Nov 20, 2023
copybara-service bot pushed a commit to google/ExoPlayer that referenced this issue Nov 20, 2023
@tianyif tianyif closed this as completed Nov 21, 2023
@androidx androidx locked and limited conversation to collaborators Jan 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants