aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/controllers/shared/m3u8-playlist.ts
blob: cea5eb5d234bfdccc935a1fb823660b0297b97ac (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12





                                                                     





                                                                                     





                                  
import express from 'express'

function doReinjectVideoFileToken (req: express.Request) {
  return req.query.videoFileToken && req.query.reinjectVideoFileToken
}

function buildReinjectVideoFileTokenQuery (req: express.Request, isMaster: boolean) {
  const query = 'videoFileToken=' + req.query.videoFileToken
  if (isMaster) {
    return query + '&reinjectVideoFileToken=true'
  }
  return query
}

export {
  doReinjectVideoFileToken,
  buildReinjectVideoFileTokenQuery
}