Однобокс Bilibili для Discourse

:information_source: Краткое описание Discourse Bilibili Onebox — это плагин, позволяющий сообществам Discourse напрямую воспроизводить видео и прямые трансляции с Bilibili.
:hammer_and_wrench: Ссылка на репозиторий GitHub - scavin/discourse-bilibili-onebox: Discourse Bilibili Onebox · GitHub
:open_book: Руководство по установке Как установить плагины в Discourse

Возможности

Просто вставьте URL видео или прямой трансляции с Bilibili на отдельной строке в редакторе, чтобы автоматически встроить и воспроизвести его. Автовоспроизведение отключено.

ДЕМО

Настройки

В настройку «Разрешенные iframe» необходимо добавить следующие две записи:

  • https://player.bilibili.com/
  • https://www.bilibili.com/
  • https://live.bilibili.com/ (для прямых трансляций)

Использование

Вставьте URL с Bilibili на отдельной строке внутри редактора. Также работают ссылки, скопированные из диалога «Поделиться» в мобильном приложении.

Примеры:

  • 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

Для прямых трансляций:

  • 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 лайк