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

Use C.TIME_UNSET instead of -1 for unknown duration #507

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

fstanis
Copy link
Contributor

@fstanis fstanis commented Dec 6, 2022

The javadoc for getDuration() in media3 Player says:

Returns the duration of the current content or ad in milliseconds, or TIME_UNSET if the duration is not known.

In my understanding, negative values other than TIME_UNSET aren't valid (although we had to guard against them in e.g. google/horologist#728).

@SigmanZero SigmanZero merged commit 34f391d into android:main Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants