Skip to content

Commit

Permalink
fix: use official embed player in bilibili video when use web (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs authored Aug 13, 2024
1 parent 34d5dd2 commit 9177a34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/renderer/src/lib/url-to-iframe.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export const urlToIframe = (url?: string | null, mini?: boolean) => {
if (url?.match(/\/\/www.bilibili.com\/video\/BV\w+/)) {
return `https://www.bilibili.com/blackboard/newplayer.html?${new URLSearchParams({
const player = window.electron ?
"https://www.bilibili.com/blackboard/newplayer.html" :
"https://player.bilibili.com/player.html"
return `${player}?${new URLSearchParams({
isOutside: "true",
autoplay: "true",
danmaku: "true",
Expand Down

0 comments on commit 9177a34

Please sign in to comment.