When does the player catch up to live - devrath/MediaAlchemySuite GitHub Wiki
Player Resync
- It is the process of the player catching up to live when it falls behind due to
seek,Network delay,buffering
| Scenario | Resync Happens When... |
|---|---|
| Buffering | Player recovers and skips ahead to minimize delay |
| Slow Network | Player adapts bitrate + reduces latency by skipping old segments |
| Manual Seek | You seek near the live edge manually |
| Automatic Sync | If LiveConfiguration.targetOffsetMs is set (e.g., 3s), ExoPlayer tries to maintain that offset from the live edge. |
🧩 Triggering Resync in Code
ExoPlayer automatically resyncs when the buffer recovers or playback stalls to stay near the targetOffsetMs.
val mediaItem = MediaItem.Builder()
.setUri("https://live.example.com/stream.m3u8")
.setLiveConfiguration(
MediaItem.LiveConfiguration.Builder()
.setTargetOffsetMs(3000) // Stay ~3s behind live edge
.build()
)
.build()