diff options
author | Chocobozzz <me@florianbigard.com> | 2022-12-02 17:54:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-12-02 17:54:23 +0100 |
commit | b8598d40f650a31fe09a4a5426dcdc2c5c0d566c (patch) | |
tree | ee41176817ef13525aadc4f0b37fc9391364d5c9 /server/lib/hls.ts | |
parent | 190ac9df7c95cdae5294596764afae7ce78d108d (diff) | |
parent | bd09dfaf8dcb0ca4cd5dac9f13e3117486f3bcce (diff) | |
download | PeerTube-b8598d40f650a31fe09a4a5426dcdc2c5c0d566c.tar.gz PeerTube-b8598d40f650a31fe09a4a5426dcdc2c5c0d566c.tar.zst PeerTube-b8598d40f650a31fe09a4a5426dcdc2c5c0d566c.zip |
Merge branch 'release/5.0.0' into develop
Diffstat (limited to 'server/lib/hls.ts')
-rw-r--r-- | server/lib/hls.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/lib/hls.ts b/server/lib/hls.ts index a41f1ae48..053b5d326 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts | |||
@@ -234,13 +234,20 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string, | |||
234 | 234 | ||
235 | // --------------------------------------------------------------------------- | 235 | // --------------------------------------------------------------------------- |
236 | 236 | ||
237 | function injectQueryToPlaylistUrls (content: string, queryString: string) { | ||
238 | return content.replace(/\.(m3u8|ts|mp4)/gm, '.$1?' + queryString) | ||
239 | } | ||
240 | |||
241 | // --------------------------------------------------------------------------- | ||
242 | |||
237 | export { | 243 | export { |
238 | updateMasterHLSPlaylist, | 244 | updateMasterHLSPlaylist, |
239 | updateSha256VODSegments, | 245 | updateSha256VODSegments, |
240 | buildSha256Segment, | 246 | buildSha256Segment, |
241 | downloadPlaylistSegments, | 247 | downloadPlaylistSegments, |
242 | updateStreamingPlaylistsInfohashesIfNeeded, | 248 | updateStreamingPlaylistsInfohashesIfNeeded, |
243 | updatePlaylistAfterFileChange | 249 | updatePlaylistAfterFileChange, |
250 | injectQueryToPlaylistUrls | ||
244 | } | 251 | } |
245 | 252 | ||
246 | // --------------------------------------------------------------------------- | 253 | // --------------------------------------------------------------------------- |