Hello!

Please tell me the solution:

If the site has a function - Add video file, with:

  1. There is a field for dragging video file / download window.
  2. Then the process of uploading the file to the server starts (the progress bar is shown in%).
  3. After a full file download, the video file encoding process is enabled.
  4. The video is published on the user's page.

The question is, please tell me - How to combine the two processes into one - uploading to the server and encoding with the display of the progress bar in minutes. And so that for 1 time the user can download no more than 9 files.

This view for downloading a video file:

<div class="es-story-video-progress-wrap video-upload-progress" style="text-align: center;" data-upload-progress> <div class="o-loader o-loader--sm o-loader--inline is-active"></div> <?php echo JText::_('Ваше видео загружается.'); ?> </div> 

This view is for encoding a video file with the inclusion of a progress bar:

 <?php if ($video->canUpload()) { ?> <div class="es-story-video-progress-wrap video-progress" data-progress> <span class="es-story-video-status-text"><?php echo JText::_('Кодирование видео уже идёт...');?> <span data-video-uploader-progress-text>0%</span></span> <div class="progress mb-5"> <div class="bar" style="width: 0%" data-video-uploader-progress-bar></div> </div> </div> <?php } ?> 

Also, there is a connected php file:

 <?php if ($cluster) { ?> <?php echo $this->html('html.miniheader', $cluster); ?> <?php } ?> <form action="<?php echo JRoute::_('index.php');?>" method="post" enctype="multipart/form-data"> <div class="es-container es-videos es-video-form" data-video-process data-id="<?php echo $video->getItem()->id;?>"> <div class="es-content"> <div class="es-videos-content-wrapper"> <div class="es-snackbar"> <?php echo JText::_("Обработка видео");?> </div> <div class="es-video-progress-area t-lg-mb--sm"> <div class="es-progress-wrap"> <div class="progress progress-success"> <div style="width: 1%" class="bar" data-video-progress-bar></div> </div> <div class="progress-result" data-video-progress-result>0%</div> </div> <div class="t-lg-mt--xl t-text--muted"><?php echo JText::_('В настоящее время мы публикуем видео');?></div> </div> </div> </div> </div> </form> 

I would be grateful for the help.

  • Please add the tag "PHP" - Bulson
  • Probably nothing, because how are you going to encode a file that does not yet exist on the server. You can of course immediately take the stream and convert it into the desired format, but this is not a trivial task. - Naumov
  • )) somehow youtube does it ... - Alexander
  • Naumov, tell me, please, how to turn on the progress bar when loading a video file? The progress bar is now turned on only when encoding a video file. And, maybe, you know how to make a progress bar not in a% value, but in a temporary one. Share, please. - Alexander

0