api/stream: add isHLS to stream cache

This commit is contained in:
wukko
2024-10-28 15:15:41 +06:00
parent a46e04358a
commit 24ae08b105
3 changed files with 7 additions and 3 deletions

View File

@@ -46,6 +46,8 @@ export function createStream(obj) {
audioBitrate: obj.audioBitrate,
audioCopy: !!obj.audioCopy,
audioFormat: obj.audioFormat,
isHLS: obj.isHLS || false,
};
streamCache.set(
@@ -100,7 +102,8 @@ export function createInternalStream(url, obj = {}) {
service: obj.service,
headers,
controller,
dispatcher
dispatcher,
isHLS: obj.isHLS,
});
let streamLink = new URL('/itunnel', `http://127.0.0.1:${env.apiPort}`);

View File

@@ -101,7 +101,7 @@ const merge = (streamInfo, res) => {
args = args.concat(ffmpegArgs[format]);
if (hlsExceptions.includes(streamInfo.service)) {
if (hlsExceptions.includes(streamInfo.service) && streamInfo.isHLS) {
args.push('-bsf:a', 'aac_adtstoasc')
}