B站的视频转到wordpress上,用插件什么的比较多余,也找不到好使的。
搜索了一下html的转载方式,其实只需要粘贴浏览器分享中贴出的html代码即可。但是直接复制的话,并不会自适应PC端浏览器,所以继续搜方法。依旧是拾人牙慧:
https://cloud.tencent.com/developer/article/1552742
完全参考以上的文档,其实这个文档也是参考的。网络的力量是伟大的哈哈哈。
其实只需要加一个js处理即可,但是凭我自己的本事大概是研究不出来了。以后分享都可以复制以下的代码,就可以搞定。以下,会生成一个播放器,但是因为BV号错误的原因,会无限加载。
记得要使用PC视频分享中的分享代码。
<iframe id="spkj"
src="https://player.bilibili.com/player.html?aid=需要的BV号以及后缀" width="100%"
frameborder="no"
scrolling="no"
allowfullscreen="allowfullscreen">
<span data-mce-type="bookmark"
style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;"
class="mce_SELRES_start">
</span> </iframe>
<script type="text/javascript">
document.getElementById("spkj").style.height=document.getElementById("spkj").scrollWidth*0.76+"px";
</script>