mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Add options to limit video duration
This commit is contained in:
parent
a14cf85763
commit
0071d3f2dc
4 changed files with 29 additions and 0 deletions
|
|
@ -90,6 +90,9 @@ class FileAdminController extends File
|
|||
$config->max_video_height = intval(Context::get('max_video_height')) ?: '';
|
||||
$config->max_video_size_action = Context::get('max_video_size_action') ?: '';
|
||||
$config->max_video_size_admin = Context::get('max_video_size_admin') === 'Y' ? 'Y' : 'N';
|
||||
$config->max_video_duration = intval(Context::get('max_video_duration')) ?: '';
|
||||
$config->max_video_duration_action = Context::get('max_video_duration_action') ?: '';
|
||||
$config->max_video_duration_admin = Context::get('max_video_duration_admin') === 'Y' ? 'Y' : 'N';
|
||||
$config->video_autoconv['any2mp4'] = Context::get('video_autoconv_any2mp4') === 'Y' ? true : false;
|
||||
$config->video_always_reencode = Context::get('video_always_reencode') === 'Y' ? true : false;
|
||||
$config->video_thumbnail = Context::get('video_thumbnail') === 'Y' ? true : false;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ $lang->msg_exceeds_max_image_height = 'This image is too large. The maximum perm
|
|||
$lang->msg_exceeds_max_video_size = 'This video is too large. Videos must be no larger than %dx%dpx.';
|
||||
$lang->msg_exceeds_max_video_width = 'This video is too large. The maximum permitted width is %dpx.';
|
||||
$lang->msg_exceeds_max_video_height = 'This video is too large. The maximum permitted height is %dpx.';
|
||||
$lang->msg_exceeds_max_video_duration = 'This video is too long. The maximum permitted duration is %d seconds.';
|
||||
$lang->msg_file_not_found = 'Could not find requested file.';
|
||||
$lang->msg_file_key_expired = 'This download link is expired. Please initiate the download again.';
|
||||
$lang->file_search_target_list['filename'] = 'File Name';
|
||||
|
|
@ -94,6 +95,7 @@ $lang->about_max_image_size = 'Limit the dimensions of uploaded images. Note tha
|
|||
$lang->max_image_size_action_nothing = 'If exceeded, do nothing';
|
||||
$lang->max_image_size_action_block = 'If exceeded, block upload';
|
||||
$lang->max_image_size_action_resize = 'If exceeded, resize automatically';
|
||||
$lang->max_image_size_action_cut = 'If exceeded, cut automatically';
|
||||
$lang->max_image_size_same_format_Y = 'Maintain file format';
|
||||
$lang->max_image_size_same_format_N = 'Convert to JPG';
|
||||
$lang->max_image_size_admin = 'Also apply to administrator';
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ $lang->msg_exceeds_max_image_height = '이미지가 너무 큽니다. 높이 %dp
|
|||
$lang->msg_exceeds_max_video_size = '동영상이 너무 큽니다. %dx%dpx 이하의 동영상만 허용됩니다.';
|
||||
$lang->msg_exceeds_max_video_width = '동영상이 너무 큽니다. 폭 %dpx 이하의 동영상만 허용됩니다.';
|
||||
$lang->msg_exceeds_max_video_height = '동영상이 너무 큽니다. 높이 %dpx 이하의 동영상만 허용됩니다.';
|
||||
$lang->msg_exceeds_max_video_duration = '동영상이 너무 깁니다. %d초 이하의 동영상만 허용됩니다.';
|
||||
$lang->msg_file_not_found = '요청한 파일을 찾을 수 없습니다.';
|
||||
$lang->msg_file_key_expired = '다운로드 링크의 유효기간이 지났습니다. 다시 다운로드하여 주시기 바랍니다.';
|
||||
$lang->file_search_target_list['filename'] = '파일 이름';
|
||||
|
|
@ -95,6 +96,7 @@ $lang->about_max_image_size = '업로드된 이미지의 크기를 제한하거
|
|||
$lang->max_image_size_action_nothing = '초과시 아무 것도 하지 않음';
|
||||
$lang->max_image_size_action_block = '초과시 업로드 금지';
|
||||
$lang->max_image_size_action_resize = '초과시 자동 크기 조정';
|
||||
$lang->max_image_size_action_cut = '초과시 자르기';
|
||||
$lang->max_image_size_same_format_Y = '동일한 포맷 유지';
|
||||
$lang->max_image_size_same_format_N = 'JPG로 변환';
|
||||
$lang->max_image_size_admin = '관리자에게도 적용';
|
||||
|
|
@ -108,6 +110,8 @@ $lang->image_autoconv_gif2mp4 = 'GIF → MP4 변환';
|
|||
$lang->about_image_autoconv_gif2mp4 = '움직이는 GIF 이미지를 MP4 동영상으로 변환하여 용량 및 트래픽을 절약합니다.<br />아래에서 ffmpeg 설정을 해야 하며, 구형 브라우저에서는 동영상이 재생되지 않을 수도 있습니다.';
|
||||
$lang->max_video_size = '동영상 크기 제한';
|
||||
$lang->about_max_video_size = '업로드된 동영상의 크기를 제한하거나 조정합니다. 파일 용량과는 직접적인 관계가 없으니 참고하세요.';
|
||||
$lang->max_video_duration = '동영상 길이 제한';
|
||||
$lang->about_max_video_duration = '업로드된 동영상의 재생 시간을 제한하거나 조정합니다. 파일 용량과는 직접적인 관계가 없으니 참고하세요.';
|
||||
$lang->video_autoconv_any2mp4 = 'MP4로 변환';
|
||||
$lang->about_video_autoconv_any2mp4 = 'MP4 이외의 동영상 포맷은 모두 웹에서 재생할 수 있는 MP4 포맷으로 변환합니다.<br />지원하는 원본 포맷은 ffmpeg 버전 및 서버 환경에 따라 다르지만 일반적으로 AVI, MOV 등이 해당됩니다.';
|
||||
$lang->video_always_reencode = '무조건 재인코딩';
|
||||
|
|
|
|||
|
|
@ -159,6 +159,26 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->max_video_duration}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="max_video_duration" id="max_video_duration" value="{$config->max_video_duration}" size="7" style="min-width:80px" /> {$lang->unit_sec}
|
||||
<select name="max_video_duration_action" id="max_video_duration_action">
|
||||
<option value="">{$lang->max_image_size_action_nothing}</option>
|
||||
<option value="block" selected="selected"|cond="$config->max_video_duration_action === 'block'">{$lang->max_image_size_action_block}</option>
|
||||
<option value="cut" selected="selected"|cond="$config->max_video_duration_action === 'cut'">{$lang->max_image_size_action_cut}</option>
|
||||
</select>
|
||||
<p class="x_help-block">
|
||||
{$lang->about_max_video_duration}
|
||||
</p>
|
||||
<p>
|
||||
<label for="max_video_duration_admin">
|
||||
<input type="checkbox" name="max_video_duration_admin" id="max_video_duration_admin" value="Y" checked="checked"|cond="$config->max_video_duration_admin === 'Y'" />
|
||||
{$lang->max_image_size_admin}
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->video_autoconv_any2mp4}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue