Note: This plugin is available as a theme component which enables a much easier installation. The plugin in this post is not actively supported, it is recommended to use the theme component : Video Upload to YouTube and Vimeo using Theme Component
Summary: Allows users on a Discourse forum to upload videos to Vimeo and YouTube directly from the Discourse composer.
GitHub: GitHub - xomads/discourse-video-upload
Install: Follow the plugin installation guide.
Features
All forum members can upload videos to Vimeo or YouTube (admins can choose to enable either or both).
Admins can control the view and embed privacy of the videos uploaded to Vimeo using admin settings.
User can control view privacy of the videos uploaded to YouTube from the upload modal.
You can watch a demo of the plugin here:
Configuration
The developer setup for enabling uploads to YouTube and Vimeo are listed below. If you prefer someone to do it for you, you can request support by contacting me, @ti0.
For YouTube Uploads
YouTube uploads go to the uploaders account, unlike Vimeo uploads which go to a common account.
View steps
-
Create an account and project at https://console.developers.google.com
-
Enable the YouTube Data API v3
-
Setup the OAuth consent screen for External users (unless all users on your Discourse forum belong to one Google organization).
-
Setup your credentials:
- Create an OAuth client ID
- Choose Web Application type
- Add your Discourse instance URL in the Authorized Javascript origins section
-
Copy the generated client ID only
-
Go to the plugin settings page in Discourse Admin, and paste the client ID in the
youtube api client id
field. -
Enable Youtube uploads by enabling this setting:
youtube upload enabled
-
Adjust the default view privacy options for Youtube if required.
-
You should now be able to upload videos from the Discourse topic composer directly to YouTube.
For Vimeo Uploads
Once you setup the plugin with the steps below, all community users will be able to upload videos to your Vimeo account.
You are responsible for limits and usage of your Vimeo account.
View steps
-
Create an account and app on Vimeo Developers:
https://developer.vimeo.com/apps/new -
Request Upload Access on the app page
-
Generate an access token with Upload permissions
-
Go to the Plugin settings page on your Discourse Admin, and add the generated access token in the
vimeo api access token
setting, and save -
Enable Vimeo uploads by enabling the
vimeo upload enabled
setting. -
Adjust view and embed privacy options
- See this vimeo page for privacy options:
privacy.view
andprivacy.embed
- See this vimeo page for privacy options:
-
You should now be able to upload videos from the Discourse topic composer directly to Vimeo
Posting a video
-
To post a video, create a new Topic or reply to an existing
topic. -
Click the new
Upload to Video
button in the composer toolbar (the video icon). This button is only visible if you have enabled either YouTube or Vimeo (or both) in the plugin settings. -
Choose a video file and edit the details such as title and description, if you wish.
-
Click the Upload to Vimeo or Upload to YouTube button.
-
The buttons shown will depend on whether you have enabled YouTube / Vimeo uploads (either or both).
-
It will show you upload progress, and then it will wait till the video completes the transcoding process.
-
The modal will remain open till the transcoding is complete.
-
Once transcoding is complete, the video link will be added to the composer (unless there was a transcoding error).
-
-
Save the post, and your video can be viewed by all other community users
(depending on privacy options you selected).
[/deta
Feature Requests
You can request additional features or support by contacting me @ti0.
Contributions
If you found the plugin helpful, please consider donating to the plugin developer using this Paypal link: PayPal.Me
Big and small contributions are equally welcome
If you would like to enhance the plugin, PRs are welcome.