Original link: https://yf-ch.com/archives/1930.html
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:
width=”100%” height=”600″
For example, the video code I want to share is this string
<iframe src=”//player.bilibili.com/player.html?aid=684876927&bvid=BV1VU4y1R72K&cid=746498983&page=1″ frameborder=”no” scrolling=”no” allowfullscreen=”allowfullscreen”> </iframe>
Then I will add this string of code behind (the red is what I added)
<iframe src=”//player.bilibili.com/player.html?aid=684876927&bvid=BV1VU4y1R72K&cid=746498983&page=1″ frameborder=”no” scrolling=”no” allowfullscreen=”allowfullscreen” width=”100%” height=”600″> </iframe>
Add &high_quality=1 at the end
For example, the URL I share is
//player.bilibili.com/player.html?aid=684876927&bvid=BV1VU4y1R72K&cid=746498983&page=1
Add &high_quality=1 at the end
//player.bilibili.com/player.html?aid=684876927&bvid=BV1VU4y1R72K&cid=746498983&page=1&high_quality=1
The meaning of embedded parameters
high_quality -> 是否高清【1: 高清(最高1080p) / 0: 最低解析度(预设)】 page -> 起始下标为1 (预设为1) as_wide -> 是否宽屏【1: 宽屏, 0: 小屏】 danmaku -> 是否开启弹幕【1: 开启(预设), 0: 关闭】 allowfullscreen -> allowfullscreen= “ture” 允许全萤幕播放
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=”//player.bilibili.com/player.html?aid=684876927&bvid=BV1VU4y1R72K&cid=746498983&page=1&high_quality=1″ 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: https://yf-ch.com/archives/1930.html
This site is for inclusion only, and the copyright belongs to the original author.