-
Notifications
You must be signed in to change notification settings - Fork 421
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
While doing HLS AES 128 playback, the player request key file for every chunk. #367
Comments
Hey @riubin , why is it that the cache expires can't be set by the server? |
Because the php server need check the session info by valid user that can watch the video. whatever, whether or not set cache expires the php server will be very hevy,but I do not want waste the resource of server. I think any others should have the problems too. |
Add: The key file will be send to client by php script.client can't get key file directly. |
Hey @riubin , the problem with caching the key requests by the player is if the keys do expire, the player has no way of knowing to fetch it again from the server. That's why the cache expires header is useful, and the caching can be done outside of the player. |
I found @benvirus had fixed this problem by check key uri and store the key: https://github.com/videojs/videojs-contrib-hls/pull/865/files/87304c6c544d8eecd7de90acdd1685e7ee75a998..d308332bb58c6734aa6a3bc15a9a4a836997faa8 |
You can fork the repo, add the cache key feature like me. |
We'll review videojs/videojs-contrib-hls#1433 and add this feature to the project |
👋 Thanks for opening your first issue here! 👋 If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
Seems related to #140 |
While we believe appropriate cache-control headers are the optimal solution, we've added an option to not re-request the key on every segment (#446). It is out in version 1.10.0. |
Just add this to your options and it will be cached. I was suffering from the same issue with latest build, and finally figured it out html5: {
vhs: {
cacheEncryptionKeys: true
}
} notice the vhs, not hls :) |
Description
I have the same question as this post:
videojs/videojs-contrib-hls#776
I want to control the key file request by php server script that only the valid user can get the AES key file. so I can not set cache expires of the key file.Therefor the php server been to very hevy. I had tried to modify mediaSegmentRequest function for check key.resovledUri and store the key value,but failed.
Is there any other way to fixed the proplem?
Thanks a lot!
videojs-contrib-hls version
videojs-contrib-hls 5.5.3
videojs version
video.js 5.19
The text was updated successfully, but these errors were encountered: