Skip to content

Instantly share code, notes, and snippets.

View sammarks's full-sized avatar

Sam Marks sammarks

View GitHub Profile
@ToshY
ToshY / BunnyVOD.php
Last active July 17, 2023 04:44
BunnyCDN VOD HLS Token Authentication V2 with directory tokens
<?php
/*
VOD HLS streaming for BunnyCDN with Token authentication V2
NOTES:
> Credits to Dejan from BunnyCDN Support for the function for token authentication V2
> I've created this snippet to show how to use HLS streaming with the directory tokens.
This is a workaround which works by appending the token query string for every request to the TS segments (see JS below)