web & api: rename stream to tunnel

- updated the endpoint to /tunnel
- updated status to tunnel
- fixed one incorrectly named error in web
This commit is contained in:
wukko
2024-09-05 00:26:48 +06:00
parent 49460bd16d
commit fff1c6c7a6
13 changed files with 99 additions and 99 deletions

View File

@@ -6,7 +6,7 @@ import { createStream } from "../stream/manage.js";
export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disableMetadata, filenameStyle, twitterGif, requestIP, audioBitrate, alwaysProxy }) {
let action,
responseType = "stream",
responseType = "tunnel",
defaultParams = {
u: r.urls,
headers: r.headers,
@@ -197,7 +197,7 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
}
if (alwaysProxy && responseType === "redirect") {
responseType = "stream";
responseType = "tunnel";
params.type = "proxy";
}

View File

@@ -41,7 +41,7 @@ export function createResponse(responseType, responseData) {
}
break;
case "stream":
case "tunnel":
response = {
url: createStream(responseData),
}

View File

@@ -118,7 +118,7 @@ export default async function(obj) {
}
return {
typeId: "stream",
typeId: "tunnel",
type: "merge",
urls: [video, audioFileLink],
audioFilename: `reddit_${id}_audio`,