Insert Video

:discourse2: Summary Insert Video adds a composer button that simplifies adding videos with subtitles (VTT format), a poster image and multiple video sources to a Discourse post.
:eyeglasses: Preview Preview on Discourse Theme Creator
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-insert-video
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

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…

:discourse2: 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 documentPerform check on document:
39 Likes

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 Likes

With which file types is this expected to work?

After adding two additional line breaks before inserting the video, I made it work with an MP4 file. But so far, I had no luck with a MOV file. And the ones I found here on Meta don’t seem to work either. For example:


Never mind. I found the answer:

2 Likes

It would be nice if there was a button in the preferences to change the video icon, or if it was a different video icon. It’s the same as the Jitshi plugin icon, so it’s hard to tell the difference.

1 Like

Can the video file be via a URL or does it need to be an uploaded file? The video that I want to use is 2.3GB (60-minute video). I tried increasing the max file size, but it doesn’t appear to be capable of something this large:

it would be great to integrate this theme component with specialized platforms such as Bunny Stream | A better way to deliver online video | bunny.net

This way you know you own your data, video storage doesn’t rely on Discourse or your server capabilities, and you pay for what you use. Ideally, you just customize your API settings on Discourse, enable the theme component, and when uploading videos, they’re automatically uploaded to bunny.net stream, and embedded into your discourse post properly without sweating it

3 Likes

We ended up finding a solution (DiscourseVideo) that uploads directly to Mux.

4 Likes

Hey @putty, is that DiscourseVideo a plugin or what? After a search here, I’m unable to see it. Thanks

1 Like

I think this is it’s repo; the guide is there.

3 Likes

Thanks @NateDhaliwal, I’m trying to get a Discourse community that is using this DiscourseVideo plugin, so I can see the user experience for myself. @putty, if you are using it, I will be happy to know the URL of your community so I can see for myself.

Thanks

1 Like

We are using the rep that @NateDhaliwal provided, but it is only visible to content admins. They are the only users in our community who have bumped against the standard file size.

2 Likes