How to limit the m3u8 segments downloaded? #7767
Unanswered
henriqueleite42
asked this question in
Q&A
Replies: 1 comment
-
Did you find an answer? I though this was the whole purpose of HLS? I inspected DevTools, and I noticed all the segment files were being download. This is actually very costly, so it's very important to solve. I do know that HLS.js has a "maxBufferLength" that may be of help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I want to limit the download of the
.ts
files of a.m3u8
video, like this:1 - The user watches a piece of the video
2 - Some
.ts
files are downloaded (like 2 or 3 files)3 - The download only continues after the user watches some of the
.ts
files__3.1 - If the user pauses the video, the download stop
So, instead of downloading everything as fast as possible, download the files progressively as the user watches the video.
This is necessary to don't download segments that the user will not watch.
Example
1 - The user opens the website and the video starts to load
2 - The
.m3u8
file and the playlist are downloaded3 - The first 3 segments of the video are downloaded
4 - The user watches 2 of the segments
5 - 3 more segments are downloaded
6 - The user watches 1 segment and stops the video
7 - The download stops and no other segment is downloaded
8 - The user starts the video again and watches one more segment
9 - 3 more segments are downloaded
May-be-related questions but with no solution
"Google searches" to (may) help others to find this question in the future
Beta Was this translation helpful? Give feedback.
All reactions