http-streaming
http-streaming copied to clipboard
Support for EXT-X-DEFINE in m3u8 files
I want to add authentication to my HLS videos, however, I am struggling to append a token to the files referenced in my m3u8 files.
I tried the beforeRequest
function on the vhs object, however, that does not work in iOS - presumably because I has its own implementation of HLS.
Apple has its own solution in the form of variable substitution, for example:
#EXTM3U
#EXT-X-VERSION:11
#EXT-X-DEFINE:QUERYPARAM="token"
#EXT-X-STREAM-INF:BANDWIDTH=400000,RESOLUTION=640x360
360.m3u8{$token}
#EXT-X-DEFINE:QUERYPARAM="token"
#EXT-X-STREAM-INF:BANDWIDTH=1000000,RESOLUTION=960x540
540.m3u8{$token}
Will this be supported in a future release? I couldn't get it to work using videojs 7.10.
If not - does anybody have any pointers on how to create the m3u8 file on-the-fly - so that the tokens can be appended on each page request?