media icon indicating copy to clipboard operation
media copied to clipboard

HLS live stream time indicator mismatch between ExoPlayer (local) and Chromecast (cast)

Open FilipKastrupGP opened this issue 2 months ago • 0 comments

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

  1. Local Playback (ExoPlayer): The time indicator correctly loops within a 6-second window, matching the media segment duration.
  2. 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());
  1. Play the provided HLS stream locally using ExoPlayer.
  2. Observe the time indicator.
  3. Cast the same HLS stream to a Chromecast device.
  4. 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 bugreport to [email protected] after filing this issue.

FilipKastrupGP avatar Oct 30 '25 19:10 FilipKastrupGP