From 62af2963142422b59d5b7686ad87264993e1d953 Mon Sep 17 00:00:00 2001 From: Camille Simiand <camille.simiand@tetras-libre.fr> Date: Wed, 2 Feb 2022 13:12:27 +0100 Subject: [PATCH] Replace project preview by video preview first frame --- assets/images/project_not_found.jpg | Bin 0 -> 4921 bytes src/Controller/CapsuleController.php | 56 ++++++++++++-- src/Entity/Capsule.php | 2 + src/Retriever/ProjectRetriever.php | 71 ++++++++++++++++++ templates/capsule/capsule_not_found.html.twig | 28 ------- templates/capsule/index.html.twig | 29 ++++--- templates/project/project_not_found.html.twig | 13 ++++ tests/functional/CapsuleControllerTest.php | 2 +- translations/messages.en.yaml | 45 +---------- translations/messages.fr.yaml | 1 + 10 files changed, 157 insertions(+), 90 deletions(-) create mode 100644 assets/images/project_not_found.jpg create mode 100644 src/Retriever/ProjectRetriever.php delete mode 100644 templates/capsule/capsule_not_found.html.twig create mode 100644 templates/project/project_not_found.html.twig diff --git a/assets/images/project_not_found.jpg b/assets/images/project_not_found.jpg new file mode 100644 index 0000000000000000000000000000000000000000..65bfcbf0ba70ae5d9fa17f1a4820d582845ce217 GIT binary patch literal 4921 zcmeAS@N?(olHy`uVBq!ia0y~yV6tXlV3gosVqjn}O<BOnz`(#<?Bp53!NGC+q5lI0 z2BD9hE{-7;bKc&qj0yRA@4(0VXEyLKpXh67&|%u7p~j)6^{zTKOK;}gAnng#{-@XG z-F$s-*ZHrNwyE2rr#%Z!TRJm(_0FZwy0}-YSkh^&p~ba{^UQ`bAO0Ac778xh(vn|y zul}KB`njKSPfX>{&y>8v;&xPvfg#E^*PEY#;efu=Mg|6>03C(~9uaN^1?Hnn3@02$ zg`gpkaQzaqN&c4$OC&G5|EPEsT_wQqqgh+S=<J-`uRd>;)V1|^996y1jo-KG^HRf8 z>v}IqMpcP1{Am9Cac#}#rG{QBuSu@GRu^7y?2F(NE`~gzxsErt&NQrb@jicX$F(>e zd4JoTObxT$(=)cNKeXjr5+g%`>uA_R!=AWQ2#TQx{mBp499(v4l3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Z#m*c;7k7R;hfQ|84cY z)rlLK*|JL6FNw+7@3?jJtp39DSAI<KycR0>@$mWQDRrMOE*732_w<8&zT*|1`CrO@ zwQc{NADysD=i{etsjB<Yc8rFu;{GysHm<n8B7BYXeY+<opT6(0ov_V7@$2*O2eTwB z^eW%{%axxt{n`DG2lm95ayc;1I<O-9-mHAybMGpAEq`tOB9bAx>HGRSTi^Av$KNPY zw${`>75(em*Z*;j52gi7m7nq{#+&~lN8Is4x=YrbE3z{W)(rj6s>={m5H7HN!k6Cn zDQ{zBB<|fkYrJA<I^&1cfjS+6a@Gb0IxpS6T~JL8dj9Ua*<ZeVhP7fxn<T#R`F-O% z`{%frZ}yjDe}*LwN=G~Eq>oXo-5bH`s+PJg=cOjYgK3HDbTo{%ei7)+etUG5W%<-q zy2?=u1;#V9LvwGQ*||EZs_)p%tzQ_<{;0`q3(7k7MbK{EuW9pG8U8)s>hdvuzHXD< z$8Aot4y?E_Z5|^-!?Ug5b~iCFL<EjT3=t7?_&;-0@X5aw0+0VOFfcH9y85}Sb4q9e E0H2-8E&u=k literal 0 HcmV?d00001 diff --git a/src/Controller/CapsuleController.php b/src/Controller/CapsuleController.php index 039087a..59797db 100644 --- a/src/Controller/CapsuleController.php +++ b/src/Controller/CapsuleController.php @@ -10,6 +10,7 @@ use App\Helper\StringHelper; use App\Repository\CapsuleRepository; use App\Builder\CapsuleBuilder; use App\Form\CreateCapsuleFormType; +use App\Retriever\ProjectRetriever; use Knp\Component\Pager\PaginatorInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Filesystem\Filesystem; @@ -22,10 +23,14 @@ use Symfony\Contracts\Translation\TranslatorInterface; class CapsuleController extends AbstractController { + private CapsuleRepository $capsule_repository; private TranslatorInterface $translator; - public function __construct(TranslatorInterface $translator) - { + public function __construct( + CapsuleRepository $capsule_repository, + TranslatorInterface $translator + ) { + $this->capsule_repository = $capsule_repository; $this->translator = $translator; } @@ -94,7 +99,7 @@ class CapsuleController extends AbstractController { $file_path = '../legacy/' . $path; if (!file_exists($file_path)) { - return $this->render('capsule/capsule_not_found.html.twig'); + return $this->render('project/project_not_found.html.twig'); } $url = $this->getParameter('app.legacy_external_prefix') . '/' . $path . "/?w=1"; @@ -105,10 +110,35 @@ class CapsuleController extends AbstractController ); } + /** + * @Route("capsule/{capsule_id}/video_preview", name="video_preview") + */ + public function videoPreview(int $capsule_id): Response + { + chdir('../legacy/'); + $file_system = new Filesystem(); + $capsule = $this->capsule_repository->findOneBy(['id' => $capsule_id]); + + if (! $capsule instanceof Capsule) { + throw new \Exception('The retrieved capsule is not an instance of Capsule.'); + } + + if (! $file_system->exists($capsule->getLinkPath())) { + return $this->render('project/project_not_found.html.twig'); + } + + $video_preview_image_link = $this->getVideoPreviewImageLink($capsule); + + return $this->render( + 'project/project_preview.html.twig', + ['video_preview_url' => $video_preview_image_link] + ); + } + /** * @Route("capsule/edit/{path}", name="edit_capsule") */ - public function edit(string $path, CapsuleRepository $capsuleRepository, TranslatorInterface $translator): Response + public function edit(string $path): Response { $current_user = $this->getUser(); @@ -116,8 +146,7 @@ class CapsuleController extends AbstractController return $this->redirectToRoute('app_logout'); } - $capsule = $capsuleRepository->findOneBy(['link_path' => $path]); - + $capsule = $this->capsule_repository->findOneBy(['link_path' => $path]); if (null === $capsule) { $this->addFlash('warning', $translator->trans('capsule.edit.not_found')); return $this->redirectToRoute('capsule_list'); @@ -130,7 +159,7 @@ class CapsuleController extends AbstractController $file_path = '../legacy/' . $path; if (!file_exists($file_path)) { - return $this->render('capsule/capsule_not_found.html.twig'); + return $this->render('project/project_not_found.html.twig'); } $url = $this->getParameter('app.legacy_external_prefix') . '/' . $capsule->getEditionLink(); @@ -298,4 +327,17 @@ class CapsuleController extends AbstractController return $capsule; } + + private function getVideoPreviewImageLink(Capsule $capsule): string + { + $project_retriever = new ProjectRetriever($capsule); + $video_url = $project_retriever->getVideoUrl(); + $video_id = $project_retriever->getVideoId($video_url); + + if (strpos($video_url, 'yout') !== false) { + return 'https://img.youtube.com/vi/' . $video_id . '/maxresdefault.jpg'; + } + + return 'https://vumbnail.com/' . $video_id . '.jpg'; + } } diff --git a/src/Entity/Capsule.php b/src/Entity/Capsule.php index 4e5249f..28ecd46 100644 --- a/src/Entity/Capsule.php +++ b/src/Entity/Capsule.php @@ -3,10 +3,12 @@ namespace App\Entity; use App\Entity\User; +use App\Retriever\ProjectRetriever; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; +use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Security\Core\User\UserInterface; /** diff --git a/src/Retriever/ProjectRetriever.php b/src/Retriever/ProjectRetriever.php new file mode 100644 index 0000000..28e7053 --- /dev/null +++ b/src/Retriever/ProjectRetriever.php @@ -0,0 +1,71 @@ +<?php + +namespace App\Retriever; + +use App\Entity\Capsule; + +class ProjectRetriever +{ + private Capsule $capsule; + + public function __construct(Capsule $capsule) + { + $this->capsule = $capsule; + } + + private static function getDomDocument(): \DOMDocument + { + chdir('../legacy/'); + + $dom_xml = new \DOMDocument(); + $dom_xml->preserveWhiteSpace = false; + return $dom_xml; + } + + public function getVideoUrl(): string + { + $dom_xml = self::getDomDocument(); + + $dom_xml->load($this->capsule->getLinkPath() . '/file/project.xml'); + $video_node = $dom_xml->getElementsByTagName('video')->item(0); + + if ($video_node === null) { + throw new \Exception("Video node could not be found in XML project file"); + } + + return $video_node->getAttribute('url'); + } + + public function getVideoId(string $video_url): string + { + if (strpos($video_url, "vimeo")) { + return $this->getVimeoVideoIdFromUrl($video_url); + } + return $this->getYoutubeVideoIdFromUrl($video_url); + } + + private function getYoutubeVideoIdFromUrl(string $video_url): string + { + $pattern = "#(?<=v=|v\/|vi=|vi\/|youtu.be\/)[a-zA-Z0-9_-]{11}#"; + $result = preg_match($pattern, $video_url, $matches); + + $video_id = ""; + + if (false !== $result) { + $video_id = $matches[0]; + } + + return $video_id; + } + + private function getVimeoVideoIdFromUrl(string $video_url): string + { + $video_id = ""; + $pattern = "/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)/"; //phpcs:ignore + + if (preg_match($pattern, $video_url, $id)) { + $video_id = $id[3]; + } + return $video_id; + } +} diff --git a/templates/capsule/capsule_not_found.html.twig b/templates/capsule/capsule_not_found.html.twig deleted file mode 100644 index 8a1484e..0000000 --- a/templates/capsule/capsule_not_found.html.twig +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="UTF-8"> - <title>{% block title %}MemoRekall{% endblock %}</title> - - {% block stylesheets %} - {{ encore_entry_link_tags('app') }} - {% endblock %} - - {% block javascripts %} - {{ encore_entry_script_tags('app') }} - {% endblock %} - - <link rel="icon" type="image/x-icon" href="{{ asset('build/images/favicon.ico') }}" /> - -</head> - -<body class="container col-10 col-md-8 col-lg-6 m-auto"> - <div class="position-relative d-flex flex-row align-items-center justify-content-center mb-5"> - <img id="header-memorekall-logo" class="memorekall-logo" src="{{ asset('build/images/MemoRekall.png') }}"> - </div> - <div class="m-auto d-flex flex-row align-items-center justify-content-center mb-5 alert alert-warning" role="status"> - <span class="p-5">{{ 'capsule.not_found' | trans }}</span> - </div> - -</body> -</html> diff --git a/templates/capsule/index.html.twig b/templates/capsule/index.html.twig index f12717e..23bb03d 100644 --- a/templates/capsule/index.html.twig +++ b/templates/capsule/index.html.twig @@ -54,17 +54,26 @@ </div> </div> - <div class="d-flex flex-column flex-md-row justify-content-center align-items-center"> - <div class="m-4 ratio ratio-16x9"> - <iframe - src="/capsule/preview/{{ capsule.getLinkPath() }}" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" - allowfullscreen> - </iframe> - </div> + <div class="d-flex flex-column flex-md-row justify-content-center align-items-center"> + <div class="m-4 ratio ratio-16x9"> +{# <img src="{{ capsule.getVideoPreviewImageLink() }}" alt="video preview">#} + {# <img src="/capsule/{{ capsule.getId() }}/video_preview" alt="video preview">#} + </div> - <div class="d-flex flex-column justify-content-center m-2 pe-2"> - <i class="fa-thin fa-gears"></i> +{# {% if 'yout' in video_url %}#} +{# <img src="https://img.youtube.com/vi/{{ capsule.getVideoId() }}maxresdefault.jpg">#} +{# {% else %}#} +{# <img src="https://vumbnail.com/{{ capsule.getVideoId() }}.jpg">#} + {# <div class="m-4 ratio ratio-16x9">#} +{# <iframe#} +{# src="/capsule/preview/{{ capsule.getLinkPath() }}"#} +{# allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"#} +{# allowfullscreen>#} +{# </iframe>#} +{# </div>#} + + <div class="d-flex flex-column justify-content-center m-2 pe-2"> + <i class="fa-thin fa-gears"></i> <div class="list-item text-nowrap"> <a href="/capsule/{{ capsule.getId() }}/editors" class="links text-decoration-none"> diff --git a/templates/project/project_not_found.html.twig b/templates/project/project_not_found.html.twig new file mode 100644 index 0000000..0112bbe --- /dev/null +++ b/templates/project/project_not_found.html.twig @@ -0,0 +1,13 @@ +{% extends 'layout.html.twig' %} + +{% block title %} + {{ 'project.not_found'|trans }} + - + {{ parent() }} +{% endblock %} + +{% block body %} + <div class="col-10 col-md-8 col-lg-6 col-xl-5 col-xxl-6 m-auto d-flex flex-row align-items-center justify-content-center mb-5 alert alert-warning" role="status"> + <span class="p-5">{{ 'project.not_found' | trans }}</span> + </div> +{% endblock %} \ No newline at end of file diff --git a/tests/functional/CapsuleControllerTest.php b/tests/functional/CapsuleControllerTest.php index 96c8136..2282b8c 100644 --- a/tests/functional/CapsuleControllerTest.php +++ b/tests/functional/CapsuleControllerTest.php @@ -45,7 +45,7 @@ class CapsuleControllerTest extends WebTestCase $submit_button = $crawler->selectButton('Create a capsule'); $form = $submit_button->form(); - $video_url = "https://TestUrl"; + $video_url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley"; $form['create_capsule_form[name]'] = self::CAPSULE_NAME; $form['create_capsule_form[video_url]'] = $video_url; diff --git a/translations/messages.en.yaml b/translations/messages.en.yaml index dca9f64..ad0f150 100644 --- a/translations/messages.en.yaml +++ b/translations/messages.en.yaml @@ -113,47 +113,4 @@ user: change_password: Change password updated_success: The password has been updated edit_profile: Edit my profile - edit_password: Edit my password - -editors: - title: Editors - title_name: Editors of capsule %capsule_name% - add_email_address: Add new editor with email address - current_editors_title: Current editors - pending_editors_title: Pending editors - user_not_editor_error: You are not editor of the capsule - add: - pending_editor: - success: The user user_email has been added to pending editor list. - He will receive an email to invite him register on MemoRekall and to inform him he has been added as an editor of this capsule. - already_added: The user user_email has already been added to pending editor list - email: - title: Invitation to edit a MemoRekall capsule - text: You have been added by %user_name% as editor of the capsule "%capsule_name%". - In order to access and edit it, you first need to register on MemoRekall. Please follow this link to - link: https://project.memorekall.com/register/ - link_name: register - user: - success: The user user_email is now an editor of the capsule capsule_name. - He will receive an email to inform him he has been added as an editor of this capsule. - already_added: The user user_email is already an editor of this capsule - email: - title: New capsule on your list - text: You have been add by %user_name% as editor of the capsule "%capsule_name%". - You can now access and edit it. You will find the capsule in your capsule list. - link: Go to capsule edition page - remove: - button: Remove - pending_editor: - title: Remove pending editor - text: Do you really want to delete pending editor %editor_email%? - link: Remove pending editor - error: The email address has already been removed from pending editors of the capsule capsule_name - success: The email address pending_editor_email has been successfully removed from pending editors of the capsule capsule_name - editor: - title: Remove editor - text: Do you really want to delete editor %editor_email%? - link: Remove editor - success: User editor_email is no longer and editor of the capsule capsule_name - error: You can't remove yourself as editor of your own capsule. - If you want to remove the capsule from your list, go to the capsule list page and click on "delete capsule" \ No newline at end of file + edit_password: Edit my password \ No newline at end of file diff --git a/translations/messages.fr.yaml b/translations/messages.fr.yaml index a6502ad..f9bee5f 100644 --- a/translations/messages.fr.yaml +++ b/translations/messages.fr.yaml @@ -62,6 +62,7 @@ capsule: created_success: La capsule capsule_name a été créée no_edition_access: Pas d'accès au mode édition contact_capsule_author_for_access: Veuillez contacter l'auteur de la capsule pour lui demander son accès en mode édition + not_found: Le projet n'existe pas edit_permissions: link: Modifier les permissions edit: -- GitLab