Discourse Bilibili 원박스

:information_source: Summary Discourse Bilibili Onebox is a plugin that allows Discourse communities to directly play Bilibili videos and live streams.
:hammer_and_wrench: Repository Link GitHub - scavin/discourse-bilibili-onebox: Discourse Bilibili Onebox · GitHub
:open_book: Install Guide How to install plugins in Discourse

Features

Simply paste a Bilibili video or live stream URL on its own line in the editor to automatically embed and play it. Autoplay is disabled.

DEMO

Settings

You need to add the following two entries to the Allowed iframes setting:

  • https://player.bilibili.com/
  • https://www.bilibili.com/
  • https://live.bilibili.com/ (FOR live streams)

Usage

Paste a Bilibili URL on its own line inside the composer. Links copied from the mobile share dialog also work.

Examples:

  • https://www.bilibili.com/video/BV1WEgJzMEK3/?spm_id_from=333.1387.homepage.video_card.click
  • https://www.bilibili.com/video/BV1WEgJzMEK3/?spm_id_from=333.1387.homepage.video_card.click&vd_source=b0a719e1950c150a97859195679d417a
  • https://www.bilibili.com/video/BV1WEgJzMEK3/
  • https://www.bilibili.com/video/BV1WEgJzMEK3
  • https://b23.tv/hiS7rgR

For live streams:

  • https://live.bilibili.com/1977907487
3개의 좋아요

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. :handshake:

1개의 좋아요

It can only be played if the official source allows iframe playback. You say neither of these is allowed.

3개의 좋아요

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.

<iframe style="width: 700px;height: 400px;" src="https://www.bilibili.com/blackboard/live/live-activity-player.html?cid=8178490&quality=0" frameborder="no"    framespacing="0" scrolling="no" allow="autoplay; encrypted-media" allowfullscreen="true"></iframe>

Test image:

Can Bilibili live broadcast rooms support link insertion or embed code adaptation to page size?

Live stream updated

1개의 좋아요

For some reason, the video won’t load.

This is the actual usage effect from 7 days ago, with no issues reported:

Plugin version: 1.3 aeb2ff4

1개의 좋아요

동영상의 특정 부분을 재생하는 기능이 지원되지 않나요? 예를 들어, 링크에 /?&p=2가 포함되어 있어도 테스트 결과 여전히 p1의 콘텐츠가 재생되었습니다.

안녕하세요, 해당 버그를 수정했습니다. 업데이트를 완료하려면 재빌드가 필요합니다.

2개의 좋아요