double map into one

This commit is contained in:
Jorrin 2024-02-27 23:30:00 +01:00
parent 7af58dd9e8
commit d20ab4be08

View File

@ -152,10 +152,9 @@ export function makeVideoElementDisplayInterface(): DisplayInterface {
if (isExtensionActiveCached()) {
hls.on(Hls.Events.LEVEL_LOADED, async (_, data) => {
console.log(data);
const chunkUrlsDomains = data.details.fragments
.map((v) => v.url)
.map((v) => new URL(v).hostname);
const chunkUrlsDomains = data.details.fragments.map(
(v) => new URL(v.url).hostname,
);
const chunkUrls = [...new Set(chunkUrlsDomains)];
await setDomainRule({