I am using videojs in live streaming environment and using nginx secure URLs to protect the stream. See here for the details - https://www.nginx.com/blog/securing-urls-secure-link-module-nginx-plus/
The algorithm works fine and the player is able to detect when the live.m3u8 file becomes available. However, when playing the stream, I just get a spinning wheel. On the JS console, I see that the sub-playlist e.g. live_109.m3u8 URL does not have the required md5 hash and expiry timestamp and hence nginx is returning 403.
The stream URL format is -
https://example.com/video/live.m3u8?md5=xznbbmbbbbbxncb&expire=123456788
When I play the stream, the console suggest that the player is now trying to call
https://example.com/video/live_109.m3u8
And since without the md5 and expiry parameters, nginx will send 403, I am getting that.
Adding ?md5=xznbbmbbbbbxncb&expire=123456788
works perfect with the live_109.m3u8 also.
I am sure the same problem will be with the individual segments (.ts files)
My question here is that how can I append ?md5=xznbbmbbbbbxncb&expire=123456788
to every .m3u8 and .ts file being called from the page.