
These have the same value (`-1`), and basically the same meaning (offset in an array/list/file/byte stream/etc), but 'position' is an overloaded term in a media playback library, and there's a risk people assume that methods like `Player.getCurrentPosition()` may return `C.POSITION_UNSET`, when in fact unset media times (whether duration or position) are always represented by `C.TIME_UNSET` which is a) a `long` (not `int`) and b) a different underlying value. (aside: `getCurrentPosition()` never returns an unset value, but it's a good example of the ambiguity of the word 'position' between 'byte offset' and 'media timestamp'.) PiperOrigin-RevId: 492493102
ExoPlayer module
This module provides ExoPlayer
, the Player
implementation for local media
playback on Android.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'androidx.media3:media3-exoplayer:1.X.X'
where 1.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.