[Media] EncoderPlugins should handle the views that concern them
Ensure the intended filetypes and mimetypes during Vips conversions (part 2) Sanitize Attachments instead of Validate (part 2) Various bug fixes
This commit is contained in:
@@ -30,7 +30,9 @@
|
||||
|
||||
namespace Plugin\VideoEncoder;
|
||||
|
||||
use App\Core\Event;
|
||||
use App\Core\Modules\Plugin;
|
||||
use App\Util\Formatting;
|
||||
|
||||
class VideoEncoder extends Plugin
|
||||
{
|
||||
@@ -55,6 +57,19 @@ class VideoEncoder extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the view for attachments of type Video
|
||||
*
|
||||
* @param array $vars
|
||||
* @param array $res
|
||||
* @return bool
|
||||
*/
|
||||
public function onViewAttachmentVideo(array $vars, array &$res): bool
|
||||
{
|
||||
$res[] = Formatting::twigRenderFile('videoEncoder/videoEncoderView.html.twig', ['attachment' => $vars['attachment'], 'thumbnail_parameters' => $vars['thumbnail_parameters']]);
|
||||
return Event::stop;
|
||||
}
|
||||
|
||||
/**
|
||||
* High quality GIF conversion.
|
||||
*
|
||||
|
Reference in New Issue
Block a user