Sam Hulick
08/10/2021, 3:11 PMthdxr
08/10/2021, 3:13 PMthdxr
08/10/2021, 3:13 PMSam Hulick
08/10/2021, 3:13 PMthdxr
08/10/2021, 3:14 PMthdxr
08/10/2021, 3:15 PMthdxr
08/10/2021, 3:16 PMSam Hulick
08/10/2021, 3:17 PMthdxr
08/10/2021, 3:20 PMSam Hulick
08/10/2021, 3:27 PM<audio src>
which basically calls a Lambda function to grab the m3u8 file from S3, inject signed URLs, then serve that up to the browser. this works great.. introduces a little latency, sadly, but not terrible. BUT, no way this would work with video content because two m3u8 files are involved. the main one has a list of secondary m3u8 files based on the user’s bandwidth & screen size (I believe) to serve up smaller files.
so now here I am 🙂 hoping that I can just set up my CloudFront CDN so that if a file ending in .m3u8
is fetched, Lambda can modify the files with in to be signed URLsthdxr
08/10/2021, 3:30 PMthdxr
08/10/2021, 3:30 PMSam Hulick
08/10/2021, 3:31 PMSam Hulick
08/10/2021, 3:31 PMthdxr
08/10/2021, 3:32 PMSam Hulick
08/10/2021, 3:32 PM<http://myurl.net/something.m3u8?signature=asdfzxdv|myurl.net/something.m3u8?signature=asdfzxdv>
Sam Hulick
08/10/2021, 3:32 PMSam Hulick
08/10/2021, 3:32 PMSam Hulick
08/10/2021, 3:34 PMSam Hulick
08/10/2021, 3:35 PMSam Hulick
08/10/2021, 3:36 PMBut I am sick of doing these increasingly ugly hacks. IMO, iframes and 3rd party cookies are dead - Apple has just killed them a year or so earlier.this thread is full of people complaining about the thing I just told you about 😄 https://gist.github.com/iansltx/18caf551baaa60b79206
Sam Hulick
08/10/2021, 3:39 PMFrank
I think I should be able to set up Lambda triggers in CloudFront using CDK/SST, yeah?Here’s an example https://docs.serverless-stack.com/constructs/StaticSite#using-lambdaedge ^^btw
sst start
currently doesn’t support Lambda@Edge. So the example above uses CDK’s EdgeFunction
. Let me or @thdxr if that’s something you need.Sam Hulick
08/10/2021, 4:14 PM