Skip to content

maxPlaylistRetries does not work for single-media (no master) HLS playlists #1596

Description

@stanislawadamowski

Summary

When playing an HLS stream without a master playlist (i.e., a single .m3u8 media playlist directly referenced as the source), the vhs.maxPlaylistRetries option does not limit playlist reload attempts as expected.
The player keeps retrying indefinitely instead of stopping after the configured number of retries.


Environment


Steps to reproduce

  1. Initialize a Video.js player with a link to a single HLS media playlist (no master playlist) as a source:
const player = videojs('video', {
  vhs: {
    maxPlaylistRetries: 3
  }
});

player.src({
  src: 'https://example.com/media.m3u8',
  type: 'application/x-mpegURL'
});
  1. Simulate a playlist fetch error (e.g., make the .m3u8 unavailable or switch to Offline in devtools>Network> throttling)
  2. Observe player network activity and logs

Expected behavior

  • The playlist should retry loading up to maxPlaylistRetries times (in this example, 3 retries)
  • After exceeding the limit, playback should stop, trigger a player error event, and not retry indefinitely

Actual behavior

  • the player retries indefinitely
  • maxPlaylistRetries appears to be ignored or not applied
  • In contrast, when a master playlist with multiple variants is used, the retry limit works correctly (after exceeding the limit, the variant is excluded and playback errors out)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions