From 71e3e879c0616882ee82a0e44f8c2e5ee9698a3e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 2 Dec 2022 14:47:21 +0100 Subject: Support reinjecting token in private m3u8 playlist --- server/controllers/shared/m3u8-playlist.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 server/controllers/shared/m3u8-playlist.ts (limited to 'server/controllers/shared') diff --git a/server/controllers/shared/m3u8-playlist.ts b/server/controllers/shared/m3u8-playlist.ts new file mode 100644 index 000000000..e2a66efc0 --- /dev/null +++ b/server/controllers/shared/m3u8-playlist.ts @@ -0,0 +1,14 @@ +import express from 'express' + +function doReinjectVideoFileToken (req: express.Request) { + return req.query.videoFileToken && req.query.reinjectVideoFileToken +} + +function buildReinjectVideoFileTokenQuery (req: express.Request) { + return 'videoFileToken=' + req.query.videoFileToken +} + +export { + doReinjectVideoFileToken, + buildReinjectVideoFileTokenQuery +} -- cgit v1.2.3