mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +00:00
api/stream: add isHLS
to stream cache
This commit is contained in:
parent
a46e04358a
commit
24ae08b105
|
@ -56,7 +56,8 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
|
|||
|
||||
case "hls":
|
||||
params = {
|
||||
type: Array.isArray(r.urls) ? "merge" : "remux"
|
||||
type: Array.isArray(r.urls) ? "merge" : "remux",
|
||||
isHLS: true,
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -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}`);
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue