iframe嵌入BiliBili视频方法B站视频外链参数

2022-10-04 16:28:39 浏览数 (2)

代码语言:javascript复制
<iframe 
src="//player.bilibili.com/player.html?aid=B站获取&cid=B站获取&page=1&danmaku=0" allowfullscreen="allowfullscreen" 
width="100%" 
height="400" 
scrolling="no" 
frameborder="0" 
sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts">
</iframe>

BILIBILI 地址PC端参数:

&danmaku=0 (1=打开弹幕 0=关闭弹幕)

iframe 参数:

allowfullscreen="allowfullscreen" #移动端全屏

sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts" #禁止弹出网页

0 人点赞