skip to Main Content

I want to play live streams from "live-edge" instead of playing from the start (first segment of manifest) with Bitmovin player.

With some HLS streams, the playback starts from the beginning of the live event. The user must manually click the "Live" button to jump to the current part of the stream. While this behavior is acceptable for VODs, it is not appropriate for live streams.

My config is as follow:

{key: '-', playback: {live: { edgeThreshold: 5 }, autoplay: true, muted: true}}

Also, with desktop browser element inject document.getElementById("#bmpui-id-185").click(); does work, but that’s nasty and doesn’t work on mobile.

2

Answers


  1. Chosen as BEST ANSWER

    None of the above proposals seemed to work but thanks for the well-written comment!

    After quite some while of trials, I finally found a working way to seek until the stream end. For some reason timeout is also necessary, probably should be ideally some play callback event. Player.seek() didn't seem to function at all with my test track.

    player = new bitmovin.player.Player(document.getElementById('player-container'), {playback: { live: { edgeThreshold: 5 }, autoplay: true, muted: true}});
    
    player.load(source).then(() => {
      if(player.isLive()){
        setTimeout(() => player.timeShift(Infinity), 10)
      }
    }).catch((error) => console.error('Error loading player:', error));
    

  2. Playing at the live edge is the default for live streams in the Bitmovin Player. You can also explicitly set that by setting the source.options.startOffset to 0 and source.options.startOffsetTimelineReference to TimelineReferencePoint.End.

    Having said that, if you are testing in Safari: There is a bug in Safari/WebKit (or further beneath) that leads to this issue: https://bugs.webkit.org/show_bug.cgi?id=259045

    From the WebKit issue:

    This is a bug in a framework below WebKit. The team responsible for that framework is actively investigating it.

    However, if you’re experiencing this also in other browsers like Chrome and you can reproduce for example on the Bitmovin Demo Player (https://bitmovin.com/demos/stream-test), it might be best to reach out to Bitmovin, either with a Support Ticket via the Bitmovin Dashboard or in the Bitmovin Community.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search