Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
video.php
1
<?php
2
3
namespace
Bitrix\Main\UI\Viewer\Transformation
;
4
5
use
Bitrix\Main\Config\Option
;
6
use
Bitrix\Main\Loader
;
7
use
Bitrix\Main\Web\MimeType
;
8
use Bitrix\Transformer\VideoTransformer;
9
10
class
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
{
32
return
MimeType::getByFileExtension
($this->
getOutputExtension
());
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
}
Bitrix\Main\Config\Option
Definition
option.php:15
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Main\Loader\includeModule
static includeModule($moduleName)
Definition
loader.php:69
Bitrix\Main\UI\Viewer\Transformation\Transformation
Definition
transformation.php:8
Bitrix\Main\UI\Viewer\Transformation\Video
Definition
video.php:11
Bitrix\Main\UI\Viewer\Transformation\Video\buildTransformer
buildTransformer()
Definition
video.php:40
Bitrix\Main\UI\Viewer\Transformation\Video\getInputMaxSize
getInputMaxSize()
Definition
video.php:45
Bitrix\Main\UI\Viewer\Transformation\Video\getOutputContentType
getOutputContentType()
Definition
video.php:30
Bitrix\Main\UI\Viewer\Transformation\Video\getOutputExtension
getOutputExtension()
Definition
video.php:35
Bitrix\Main\UI\Viewer\Transformation\Video\getInputContentTypes
static getInputContentTypes()
Definition
video.php:12
Bitrix\Main\Web\MimeType
Definition
mimetype.php:7
Bitrix\Main\Web\MimeType\getByFileExtension
static getByFileExtension($extension)
Definition
mimetype.php:238
Bitrix\Main\UI\Viewer\Transformation
Definition
callbackhandler.php:3
modules
main
lib
ui
viewer
transformation
video.php
Создано системой
1.10.0