DEV: Create a site setting for video thumbnails (#21266)

Creating a way to disable the auto generation of video thumbnails.
This commit is contained in:
Blake Erickson 2023-04-26 14:18:59 -06:00 committed by GitHub
parent c6d44e504f
commit 67a8c13197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,9 @@ export default Mixin.create(ExtendableUploader, UppyS3Multipart, {
@bind
_generateVideoThumbnail(videoFile, uploadUrl) {
if (!this.siteSettings.video_thumbnails_enabled) {
return;
}
let video = document.createElement("video");
video.src = URL.createObjectURL(videoFile.data);

View File

@ -1568,6 +1568,10 @@ files:
default: false
client: true
hidden: true
video_thumbnails_enabled:
default: true
client: true
hidden: true
trust:
default_trust_level: