Closed benwilber closed 5 years ago
I got same problem, please help
@benwilber are you still interested in this feature?
@forbesjo Yes I am still interested in implementing this fix. Unfortunately I'm not very familiar with this tech stack and have been having trouble updating the tests so that this case is properly covered. If anybody could provide any assistance, or point me in the right direction I would appreciate it.
Thanks!
Thank you for your PR but we will not be accepting new changes for this repo and will be archived very soon. I would advise you to open your PR against the next iteration of this project at https://github.com/videojs/http-streaming.
Description
See: https://github.com/videojs/videojs-contrib-hls/issues/1395
AES encryption keys are fetched for every segment even if the same key is used to encrypt multiple segments (per HLS specification.) This causes unnecessary load on the key server if access to encryption keys are guarded by user-specific authentication and authorization mechanisms.
Specific Changes proposed
Cache encryption keys based on their resolved URI and only fetch keys when they're needed to decrypt the next series of segments.
Requirements Checklist
This is a rather crude PR because it doesn't update the tests (they fail now) and I'm not even sure this is the correct way to implement this. I'm not very experienced with this tech stack (I can't figure out how the testing libraries are supposed to work) so this is more "request for guidance" to implement this bug fix.
All feedback or assistance is welcome!