/plushcap/analysis/mux/mux-service-workers-are-underrated

Service workers are underrated, and building media proxies proves it

What's this blog post about?

Service workers, often seen as a means for caching in progressive web apps, are HTTP proxies that can do much more than just caching. They can manipulate requests, resize or convert images, add security layers to HLS streams, and stitch in ads. A service worker is first-party JavaScript that intercepts requests for all pages within its scope. Service workers run in their own context, allowing intensive work without interfering with web page interactivity. They are well supported across evergreen browsers, including mobile ones. One overlooked element of modern streaming video is that it's a lot of text files, making service workers an ideal tool for manipulating media by editing those text files.

Company
Mux

Date published
Aug. 21, 2023

Author(s)
Matthew McClure

Word count
1942

Language
English

Hacker News points
3


By Matt Makai. 2021-2024.