Website inserts HD bilibili video code

Original link:

There are a lot of video resources to share at station B. If you want to share your own WP and ty websites, what should you do?
At present, bilibili actually has a sharing function: using insert media in the WP background, after filling in the code, it will become like the picture below, the size of the entire movie is reduced because the preset external site reference resolution of station B is the lowest, so If you can’t paste the code directly, you need to add a piece of code, so that the video of station B can be changed according to the size of your own website:

Add code to modify video display size

width=”100%” height=”600″

For example, the video code I want to share is this string

 <iframe src=”//″ frameborder=”no” scrolling=”no” allowfullscreen=”allowfullscreen”> </iframe>

Then I will add this string of code behind (the red is what I added)

 <iframe src=”//″ frameborder=”no” scrolling=”no” allowfullscreen=”allowfullscreen” width=”100%” height=”600″> </iframe>

Add code to modify video resolution (default is ground resolution)

Add &high_quality=1 at the end

For example, the URL I share is


Add &high_quality=1 at the end


The meaning of embedded parameters

 high_quality -> 是否高清【1: 高清(最高1080p) / 0: 最低解析度(预设)】 page -> 起始下标为1 (预设为1) as_wide -> 是否宽屏【1: 宽屏, 0: 小屏】 danmaku -> 是否开启弹幕【1: 开启(预设), 0: 关闭】 allowfullscreen -> allowfullscreen= “ture” 允许全萤幕播放

Prevent jumping to station B

On the web page, the user selects the resolution, or clicks on some icons on the video to jump to station B. This can be disabled by setting the sandbox attribute of the iframe.

sandbox=”allow-top-navigation allow-same-origin allow-forms allow-scripts”

 <iframe src=”//″ width=”100%” height=”600″ frameborder=”no” scrolling=”no” sandbox=”allow-top-navigation allow-same-origin allow-forms allow-scripts” allowfullscreen=”allowfullscreen”> </iframe>

Note: If the sandbox is only set, but the high_quality field is not set to 1, the user cannot switch the video resolution.
That is, the user can only click on 360p, and clicking on 720p or 1080p is invalid.

This article is reproduced from:
This site is for inclusion only, and the copyright belongs to the original author.