HLS live stream time indicator mismatch between ExoPlayer (local) and Chromecast (cast)
Version
Media3 1.8.0
More version details
We are observing a discrepancy in the time indicator's behavior when playing the same HLS live stream locally versus casting it, which makes it difficult to reliably calculate the stream's current wall-clock time.
Stream Details: HLS live stream, ~30-minute DVR window, 6-second segments.
Note: The stream I have available is audio only,- but I dont think that makes a difference.
Observed Behavior
- Local Playback (ExoPlayer): The time indicator correctly loops within a 6-second window, matching the media segment duration.
- Cast Playback (Chromecast): The time indicator increases continuously and does not loop or reflect the segment-based window.
Impact This inconsistency prevents us from reliably calculating the stream's wall-clock time on the sender application when casting.
Current Workaround We are currently working around this by creating custom data on the cast receiver and retrieving an "ExoPlayer-ish" time via remoteMediaClient.getMediaStatus().getCustomData().
Devices that reproduce the issue
Any
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
In the demo-cast app,- add a live stream with a large window to the DemoUtil In our case it is an HLS stream.
samples.add(
new MediaItem.Builder()
.setUri(
[A live hls stream with a large window])
.setMediaMetadata(
new MediaMetadata.Builder()
.setTitle("Live HLS stream with window")
.build())
.setMimeType(MIME_TYPE_HLS)
.build());
- Play the provided HLS stream locally using ExoPlayer.
- Observe the time indicator.
- Cast the same HLS stream to a Chromecast device.
- Observe the time indicator.
Expected result
The time indicator's behavior is consistent across both local (ExoPlayer) and cast (Chromecast) playback to allow for reliable calculation of the stream's position and wall-clock time.
Actual result
Local (ExoPlayer): The time indicator loops within a 6-second window (matching the segment duration).
Cast (Chromecast): The time indicator increases continuously.
Media
Cant publicly share the streams,- but will share via mail Its a live audio hls stream with a large window
Bug Report
- [ ] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.