The ability to encrypt segments was introduced as a pull request in
HLS-17
At the time I did a fairly cursory code review - scanned the patch, and ran against a video to check it worked.
HLS-20 shows that this probably wasn't enough, so I want to take a close look at that function (including the
HLS-20 changes) and make sure there aren't any other issues hiding.
Activity
2017-04-27 09:16:30
If we've got an ABR stream with 3 bitrates, containing 5 segments each, then when we move onto the second bitrate count is going to be at 6 (whilst we'll expect it to be 0).
So the function almost certainly needs adapting to take bitrates into account rather than simply iterating over files.
Apple's technote ( https://developer.apple.com/library/content/technotes/tn2288/_index.html ) specifies that
So this is almost certainly going to be an issue. Longer term, it'd be better to follow their advice and set a specific IV (which will mean rewriting the manifest), but in the short term need to make the sequence numbers work as a minimum
Raised as HLS-22
2017-04-29 12:12:51
Webhook User-Agent
View Commit
2017-04-29 12:16:36
At some point the way the manifests are updated will almost certainly change (particularly if we move away from the IV being based upon the segment number), but other than that it now looks OK, and handles ABR streams correctly.
2017-04-29 12:16:43
2017-04-29 12:16:43
2017-04-29 12:16:49