Search code examples
streamingvideo-streamingm3u8http-live-streaming

Why does Video JS HLS not work as expected only with 60 second segments?


To make a streaming service, I am serving m3u8 and ts files generated with AWS elastic transcoder.

The video player I am using is video js with videojs-contrib-hls.

I am providing the player with the master playlist 01.m3u8, which has the url to two different bitrate playlists 1M_.m3u8 amd 2M_.m3u8 (not important in my opinion)

Streaming works well when my segments are short. ex 10 seconds. However when I use 60 seconds the functionality does not work as expected. The buffer stops and seeking does not work. When I seek a new section of the movie, exception is caught.

Cannot read property 'pts' of undefined

What could be causing this?


Solution

  • Answering my own question.

    It turns out that the problem was from the cloudfront. The files were cached and serving the undesired ts files.

    It was solved by cache busting.