Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use ll-hls query directives and support skipping segments #1079

Merged
merged 30 commits into from
May 26, 2021
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3d39612
feat: Use ll-hls query directives and support skipping segments
brandonocasey Feb 11, 2021
5e46a1e
Merge branch 'main' into feat/llhls-3
brandonocasey Apr 7, 2021
df957d4
Merge branch 'main' into feat/llhls-3
brandonocasey Apr 7, 2021
ff40332
unified manifest parse function
brandonocasey Apr 8, 2021
53ec980
tests for llhls and query directives in playlist-loader
brandonocasey Apr 8, 2021
addf841
Merge branch 'main' into feat/llhls-3
brandonocasey Apr 8, 2021
285a4ae
Merge branch 'main' into feat/llhls-3
brandonocasey Apr 26, 2021
a46f0a7
remove unused option
brandonocasey Apr 26, 2021
9d1fc06
add duration to preload segment
brandonocasey Apr 27, 2021
00a8e25
always add a part target duration when we have parts
brandonocasey Apr 28, 2021
1ff48b0
query directive fixes
brandonocasey Apr 28, 2021
3ff694a
small logging fix, bring map to skipped segments
brandonocasey Apr 28, 2021
d3fb477
pare down changes
brandonocasey Apr 28, 2021
2854967
cover all scenarios
brandonocasey Apr 29, 2021
a842b84
fix logging and merging issues
brandonocasey Apr 29, 2021
7898b4f
Merge branch 'main' into feat/llhls-3
brandonocasey May 24, 2021
3ff79bc
check for endlist before trying query directives
brandonocasey May 24, 2021
8ca1629
code review
brandonocasey May 24, 2021
941881f
use new media
brandonocasey May 25, 2021
9288f11
Update src/playlist-loader.js
brandonocasey May 25, 2021
adb47d2
Update src/playlist-loader.js
brandonocasey May 25, 2021
9744999
Update src/playlist-loader.js
brandonocasey May 25, 2021
1d2b8a2
Update test/playlist-loader.test.js
brandonocasey May 25, 2021
ee09077
remove uneeded comment and duplicate test
brandonocasey May 25, 2021
a1d3176
separate code
brandonocasey May 25, 2021
c555607
add before/afterEach
brandonocasey May 25, 2021
44b8830
log error on missing PART-TARGET
brandonocasey May 26, 2021
2aa89ab
add spec, capitalize llhls
brandonocasey May 26, 2021
bba29c4
add comment for _HLS_msn= logic
brandonocasey May 26, 2021
e8cd59d
Update src/playlist-loader.js
brandonocasey May 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/playlist-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ const addLLHLSQueryDirectives = (uri, media) => {
// next msn is a zero based value, length is not.
let nextMSN = media.mediaSequence + media.segments.length;

// If preload segment has parts then it is likely
// that we are going to request a part of that preload segment.
// the logic below is used to determine that.
if (preloadSegment) {
const parts = preloadSegment.parts || [];
// _HLS_part is a zero based index
Expand All @@ -44,10 +47,15 @@ const addLLHLSQueryDirectives = (uri, media) => {
query.push(`_HLS_part=${nextPart}`);
}

// if we are requesting a nextPart or preload segment was added
// to our segment list. We are requesting a part of the preload segment
// or the full preload segment. Either way we need to go down by 1
// in nextMSN
// this if statement makes sure that we request the msn
// of the preload segment if:
// 1. the preload segment had parts (and was not yet a full segment)
// but was added to our segments array
// 2. the preload segment had preload hints for parts that our not in
brandonocasey marked this conversation as resolved.
Show resolved Hide resolved
// the manifest yet.
// in all other cases we want the segment after the preload segment
// which will be given by using media.segments.length because it is 1 based
// rather than 0 based.
if (nextPart > -1 || parts.length) {
nextMSN--;
}
Expand Down