Skip to content

Commit

Permalink
Add: Audio Tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
OshekharO authored Sep 21, 2023
1 parent 07a6fb9 commit cf6e4c5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions repo/invidious.io.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,17 @@ export default class extends Extension {
language: item.code,
}));

const track = res.audioStreams.map((item) => ({
title: item.format,
url: item.url,
language: item.quality,
}));

return {
type: "hls",
url: res.videoStreams?.[0]?.url,
subtitles: subtitles,
audioTrack: track,
};
}
}

0 comments on commit cf6e4c5

Please sign in to comment.