mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-13 08:35:08 +01:00
double map into one
This commit is contained in:
parent
7af58dd9e8
commit
d20ab4be08
@ -152,10 +152,9 @@ export function makeVideoElementDisplayInterface(): DisplayInterface {
|
|||||||
|
|
||||||
if (isExtensionActiveCached()) {
|
if (isExtensionActiveCached()) {
|
||||||
hls.on(Hls.Events.LEVEL_LOADED, async (_, data) => {
|
hls.on(Hls.Events.LEVEL_LOADED, async (_, data) => {
|
||||||
console.log(data);
|
const chunkUrlsDomains = data.details.fragments.map(
|
||||||
const chunkUrlsDomains = data.details.fragments
|
(v) => new URL(v.url).hostname,
|
||||||
.map((v) => v.url)
|
);
|
||||||
.map((v) => new URL(v).hostname);
|
|
||||||
const chunkUrls = [...new Set(chunkUrlsDomains)];
|
const chunkUrls = [...new Set(chunkUrlsDomains)];
|
||||||
|
|
||||||
await setDomainRule({
|
await setDomainRule({
|
||||||
|
Loading…
Reference in New Issue
Block a user