Skip to content

Commit

Permalink
feat(processor.ts): update bilibili iframe rules
Browse files Browse the repository at this point in the history
- disable danmaku and enable default high quality
- enable page parse
  • Loading branch information
aidenlx committed Apr 12, 2021
1 parent a890aa7 commit 6866dd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/processor.ts
Expand Up @@ -276,7 +276,10 @@ function convertToEmbedUrl(src: URL): string | null {
console.error(`invaild bilibili video-id: ${videoId}`);
return null;
}
return `https://player.bilibili.com/player.html${queryStr}`;
let page = src.searchParams.get("p");
if (page)
queryStr += `&page=${page}`
return `https://player.bilibili.com/player.html${queryStr}&high_quality=1&danmaku=0`;
} else {
console.log("not recognized as bilibili video");
return null;
Expand Down

0 comments on commit 6866dd7

Please sign in to comment.