How to use
just paste your bilibili url, like this
https://www.bilibili.com/video/BV1294y1b7Cx
https://www.bilibili.com/video/BV1294y1b7Cx/?spm_id_from=333.788
then you embed this video successfully bili测试 - 🗣️闲聊 - 始徒
如何使用本插件
在discourse中黏贴b站视频链接即可,如
https://www.bilibili.com/video/BV1294y1b7Cx
https://www.bilibili.com/video/BV1294y1b7Cx/?spm_id_from=333.788
插件会自动将链接解析成视频 bili测试 - 🗣️闲聊 - 始徒
Thanks for the author
I found the plugin by google about how to embed bilibili in discourse and got it in github, but i don’t found anything about the author in discourse meta forum
Anyway ,thanks for your help about bilibili
「いいね!」 6
Canapin
(Coin-coin le Canapin)
2023 年 10 月 17 日午前 8:58
2
Hi, thanks for sharing this
I had a quick look at it, and have a few remarks:
You can’t disable the plugin. There is no setting for this (the input is disabled).
To disable the plugin, you need to uninstall it.
You need to add https://player.bilibili.com
in the allowed iframes site setting.
The videos from bilibili inside iframes are autoplay ( ).
This plugin would benefit from improvements.
「いいね!」 3
Moin
2023 年 10 月 17 日午前 9:34
3
Isn’t that explained in the first post? I understood it as a feature, so you can control whether you get a video onebox or a regular onebox.
mocha3901:
if paste with parameters, like this
https://www.bilibili.com/video/BV1294y1b7Cx/?spm_id_from=333.788
there will be a summary of this website
「いいね!」 2
Canapin
(Coin-coin le Canapin)
2023 年 10 月 17 日午前 9:41
4
Thanks, I removed these points from my post
I don’t see it as a feature, the plugin’s regex only takes into account links that don’t have anything after video/
and the onebox is just the expected fallback for links that don’t match a onebox script pattern.
Arbitrarily adding a query string to display a regular onebox would be a weird way to control how a URL is displayed, though I agree that it would definitely be useful for this since the videos are autoplay.
「いいね!」 3
Coin-coin le Canapin:
You need to add https://player.bilibili.com
in the allowed iframes site setting.
The videos from bilibili inside iframes are autoplay ( ).
thanks for your reply, i just want to embed bili video in my site, the method of add https://player.bilibili.com
in the allowed iframes doesn’t work , i don’t know how to fix it
this is indeed a problem, but i don’t know how to add the function of disable plugin, i just can use it, don’t know how to modify the code
Lhc_fl
(Linca)
2023 年 10 月 18 日午前 3:51
7
mocha3901:
this is indeed a problem, but i don’t know how to add the function of disable plugin, i just can use it, don’t know how to modify the code
我知道怎么做,你去加个config就可以了。我等会要是有空给你提个PR。
upd:啊?这个不是你写的啊?那没办法了
这是我写的一个很简单的插件,你可以参考一下怎么加的config
Lhcfl/discourse-another-smtp (github.com)
我fork了一下 ,改了改正则表达式,现在也可以识别有参数的超链接了
我试着改了一下config,失败😂,每次修改再验证还得rebuild,太费时间了,等大佬有空直接pr吧🙏
Coin-coin le Canapin:
I don’t see it as a feature, the plugin’s regex only takes into account links that don’t have anything after video/
and the onebox is just the expected fallback for links that don’t match a onebox script pattern.
Arbitrarily adding a query string to display a regular onebox would be a weird way to control how a URL is displayed, though I agree that it would definitely be useful for this since the videos are autoplay.
i have fork and modify the regex code , urls with parameters are now recognized normally
Canapin
(Coin-coin le Canapin)
2023 年 10 月 18 日午前 9:03
10
Good job
When you’re happy with the result, I suggest you request access to Plugin authors - Discourse Meta and post your plugin in plugin
Lhc_fl
(Linca)
2023 年 10 月 18 日午前 11:55
11
whitewatercn:master
← Lhcfl:master
opened 11:53AM - 18 Oct 23 UTC
另外写插件当然是要在开发环境下,rebuild也太麻烦了……
「いいね!」 2
已经merge了,原来config里还要写设置的名称😂
请问怎么部署开发环境呀?
Lhc_fl
(Linca)
2023 年 10 月 19 日午前 9:48
13
「いいね!」 2
Rick_Jing
(Rick Jing)
2024 年 2 月 16 日午後 12:00
18
试了下不能用,现在bilibili iframe 里面必须要有cid,aid了吗?还有没有方法能实现嵌入呢?
这个插件只会匹配bv号,其他内容会自动忽略,更多需要可以提交pr,菜鸟只能做到这样了
关于cid我查到一些资料,也许能帮助到你
https://www.zhihu.com/question/400156620?utm_id=0
「いいね!」 1