stream: add hls support for internal streams (#525)

This commit is contained in:
Mikhail Serebryakov
2024-06-07 16:08:20 +05:00
committed by GitHub
parent 4c8cd9dd30
commit 68f311c318
3 changed files with 63 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ import { randomBytes } from "crypto";
import { nanoid } from "nanoid";
import { decryptStream, encryptStream, generateHmac } from "../sub/crypto.js";
import { env, hlsExceptions } from "../config.js";
import { env } from "../config.js";
import { strict as assert } from "assert";
// optional dependency
@@ -106,12 +106,6 @@ export function destroyInternalStream(url) {
}
function wrapStream(streamInfo) {
/* m3u8 links are currently not supported
* for internal streams, skip them */
if (hlsExceptions.includes(streamInfo.service)) {
return streamInfo;
}
const url = streamInfo.urls;
if (typeof url === 'string') {