社区文档构建进行中,欢迎编辑。社区答疑群(非官方):717421103
Widget:Biliplayer
<script> (window.RLQ = window.RLQ || []).push(['jquery', () => {
$(document).ready(function () { var moshi = ``; var ua = navigator.userAgent.toLowerCase(); var shebei = "" if (/android|adr/gi.test(ua)) { shebei = "android" } if (/\(i[^;]+;( U;)? CPU.+Mac OS X/gi.test(ua)) { shebei = "ios" } if (/iPad/gi.test(ua)) { shebei = "ios" } if (/windows nt/.test(ua)) { shebei = "pc" } if (window.biliplayerWc == undefined) { window.biliplayerWc = 0; } if (moshi == ``) { moshi = `1`; } switch (moshi) { case `1`: { var element = document.querySelector(`.biliplayerW-dom#d`) element.setAttribute('id', `bilip${window.biliplayerWc}`); if (shebei == "pc") {
document.querySelector(`.biliplayerW-dom#bilip${window.biliplayerWc}`).innerHTML = `
`
} else {
document.querySelector(`.biliplayerW-dom#bilip${window.biliplayerWc}`).innerHTML = `
`
} break; } case `2`: { var Bvid = ``; var Pname = ``; biliplayerWc1 = window.biliplayerWc; var element = document.querySelector(`.biliplayerW-dom#d`) element.setAttribute('id', `bilip${window.biliplayerWc}`); iframevideo1(Bvid,Pname,biliplayerWc1); break; } } window.biliplayerWc = window.biliplayerWc + 1;
function iframevideo1(b, p, i) { $.get(`https://api.bilibili.com/x/web-interface/view?bvid=${b}`).then(function (result) { var queryData = result.data.pages.filter(function (_data) { return _data.part == p; }); if (shebei == "pc") {
document.querySelector(`.biliplayerW-dom#bilip${i}`).innerHTML = `
`
} else {
document.querySelector(`.biliplayerW-dom#bilip${i}`).innerHTML = `
`
} }); } })
}]); </script>