Install this theme component
Features
Clicking the button triggers a modal window that allows uploading/linking the relevant files and then adds the appropriate HTML code in the composer:
Settings
Name
Description
default track label
default track langcode
only available to staff
disable download
text tracks as blobs
When using subtitles, download VTT files and inject as blob (fixes issues when using S3 storage or a CDN)
(For uploads to work, you’ll need to allow .vtt and your chosen video formats in the authorized extensions site setting.)
Translation
Default
modal.title
Insert Video
modal.video_title
Add video sources
modal.poster
Poster image (optional)
modal.vtt_title
Subtitles (optional)
modal.vtt_help
Comma-delimited, in the format: url,label,langcode
modal.insert
Insert
modal.cancel
Cancel
source_not_video
Error: One of the video source URLs is invalid.
composer_title
Insert Video
simple_list_placeholder
Add item…
Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.
Last edited by @JammyDodger 2024-06-13T07:09:42Z
Check document Perform check on document:
39 个赞
tomtjes
(Thomas Reintjes)
2020 年4 月 11 日 23:48
2
Sweet, thank you! Would it be possible to allow audio as well and just keep showing the poster image (or if none is available maybe a configurable background color) plus subtitles?
Also, and I realize this is a much bigger ask, would something like what the YouTube Timestamps Component does be doable with this component in the long-term? That’d be absolutely fantastic.
3 个赞
Moin
2024 年5 月 31 日 18:36
37
此功能支持哪些文件类型?
在插入视频前添加两个额外的换行符后,我使用 MP4 文件成功了。但到目前为止,MOV 文件一直不成功。这里找到的也不起作用。例如:
算了。我找到了答案:
From my tests:
webm – works fine
ogg – can work, but by default, you can’t select it because the mime type is not referenced here ; however, as workaround you can choose “all files” in the windows, and select your .ogg file, It will work. You should not be able to validate any files (even if restricted by authorized extensions setting) .
mov – doesn’t work as it is, but it can if you remove manually type="video/mov" or use type="video/mp4" instead. This should be handled in th…
2 个赞
Truest
2024 年6 月 17 日 05:09
38
如果首选项中有一个按钮可以更改视频图标,或者视频图标不同,那就太好了。它与 Jitshi 插件图标相同,因此很难区分。
1 个赞
putty
(Derek Putnam)
2024 年6 月 20 日 13:34
39
视频文件可以通过 URL 提供,还是需要上传文件?我想使用的视频是 2.3GB(60 分钟视频)。我尝试增加最大文件大小,但似乎无法处理这么大的文件:
将此主题组件与专门的平台集成将非常棒,例如 Bunny Stream | A better way to deliver online video | bunny.net
这样您就知道自己拥有数据,视频存储不依赖于 Discourse 或您的服务器功能,并且您只需为使用的付费。理想情况下,您只需在 Discourse 上自定义您的 API 设置,启用主题组件,然后在上传视频时,它们会自动上传到 bunny.net stream,并正确嵌入到您的 discourse 帖子中,无需费力。
4 个赞
putty
(Derek Putnam)
2024 年9 月 12 日 13:06
41
我们最终找到了一个解决方案(DiscourseVideo),它可以直接上传到 Mux。
4 个赞
efuetatem1
(Efuet A Andrew)
2024 年11 月 3 日 21:20
42
嘿 @putty ,那个 DiscourseVideo 是一个插件还是什么? 在这里搜索后,我找不到它。 谢谢
1 个赞
efuetatem1
(Efuet A Andrew)
2024 年11 月 4 日 10:53
44
感谢 @NateDhaliwal ,我正在尝试获取一个正在使用此 DiscourseVideo 插件的 Discourse 社区,以便亲身体验用户体验。@putty ,如果你正在使用它,我很乐意知道你的社区网址,以便我亲身体验。
谢谢
1 个赞
putty
(Derek Putnam)
2024 年11 月 4 日 14:19
45
我们正在使用 @NateDhaliwal 提供的 rep,但它仅对内容管理员可见。他们是我们社区中唯一遇到标准文件大小限制的用户。
2 个赞
唐帅华
(tang shuaihua)
2025 年4 月 8 日 17:04
46
我在上传视频时遇到了[抱歉,您尝试上传的文件不被允许(允许的扩展名:jpg, jpeg, png, gif, heic, heif, webp, avif)。]报错。这是怎么回事?是说我要更改网站上传的文件中扩展名的范围?
1 个赞
putty
(Derek Putnam)
2025 年4 月 8 日 17:23
47
您正在上传的文件是什么类型?也许您需要在设置中将该格式列入白名单。
4 个赞
唐帅华
(tang shuaihua)
2025 年4 月 9 日 13:37
48
我添加了.vtt以及视频格式,现在我已经能够正常插入视频了,感谢您提供的帮助
2 个赞
putty
(Derek Putnam)
2025 年10 月 29 日 14:28
60
这是一个分支版本,它将权限从仅限 Y/N 员工更新为已批准的组。
Contribute to dereklputnam/discourse-insert-video development by creating an account on GitHub.
在我的例子中,我的营销团队希望能够指定缩略图,但我不想授予他们 staff 权限,也不想让我的整个社区都能访问。
1 个赞