Why this exists
You serve HEVC because it saves bandwidth — 30-50% smaller than H.264 at the same quality. But some browsers still can't play it. Those users get a black screen, a fallback to lower quality, or nothing.
The usual fix is double-encoding: serve HEVC for browsers that support it, H.264 for the rest. That means maintaining two encoding pipelines, two sets of manifests, and twice the storage on your CDN.
hevc.js takes a different approach. Keep your single HEVC pipeline. For the ~6% of browsers that need it, the transcoding happens client-side, in a Web Worker, invisible to your player and your infrastructure.
The decoder is a direct implementation of the ITU-T H.265 spec — 716 pages of it, transcribed to C++17 and compiled to WebAssembly. Every frame is validated pixel-perfect against ffmpeg.