scavin introduces the Discourse Bilibili Onebox plugin, which allows users to embed and play Bilibili videos and live streams directly in Discourse posts by pasting URLs. The plugin requires adding specific Bilibili domains to the Allowed iframes setting. While standard video embedding works well, qi_lu inquires about supporting other Chinese platforms like Xiaohongshu and Douyin. scavin explains that embedding is only possible if the platform officially allows iframe playback, noting that neither Xiaohongshu nor Douyin currently support this.
Regarding live streams, qi_lu reports that pasting live stream URLs does not generate a preview, and manual iframe code results in sizing issues. In response, scavin updates the plugin to support live streams via a specific commit. Later, 祁同伟 reports that videos fail to load, but scavin attributes this to an outdated plugin version and provides a working example. Finally, Noble_Fish notes a bug where links with page parameters (e.g., ?p=2) always play the first page. scavin confirms this bug has been fixed and advises rebuilding the plugin to apply the update.
Very useful.
May I ask if it’s possible to develop media embedding plugins for other platforms? For example, commonly used Chinese video platforms like Xiaohongshu and Douyin.
Normal video testing is fine; links can be displayed when inserted, but it seems the live broadcast room cannot.
No web links in the live broadcast room can be previewed.
The only viable option in the live broadcast room is the iframe embed code. However, the size is not quite right, and parameter modification is not taking effect.
Does it not add support for playing a specific part of a video? For example, I found in testing that even if the link has /?&p=2, it still plays the content of p1.