Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
video.php
1<?php
2
4
8use Bitrix\Transformer\VideoTransformer;
9
10class Video extends Transformation
11{
12 public static function getInputContentTypes()
13 {
14 return [
15 'video/avi',
16 'video/mp4',
17 'video/webm',
18 'video/ogg',
19 'video/3gpp',
20 'video/quicktime',
21 'video/x-flv',
22 'video/x-msvideo',
23 'video/x-matroska',
24 'video/x-m4v',
25 'video/h264',
26 'video/x-ms-wmv',
27 ];
28 }
29
30 public function getOutputContentType()
31 {
33 }
34
35 public function getOutputExtension()
36 {
37 return 'mp4';
38 }
39
40 public function buildTransformer()
41 {
42 return new VideoTransformer();
43 }
44
45 public function getInputMaxSize()
46 {
47 if (Loader::includeModule('bitrix24') && \CBitrix24::isLicensePaid())
48 {
49 return (int)(Option::get('main', 'max_size_for_video_transformation_paid', 3072)) * 1024 * 1024;
50 }
51
52 return (int)(Option::get('main', 'max_size_for_video_transformation', 300)) * 1024 * 1024;
53 }
54}
static includeModule($moduleName)
Definition loader.php:69
static getByFileExtension($extension)
Definition mimetype.php:238