From: Vincent Vanwaelscappel Date: Tue, 22 Apr 2025 17:47:51 +0000 (+0200) Subject: wip #7259 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5c1a7b9a84fc383db34c9993149318d404d47740;p=fluidbook-toolbox.git wip #7259 @1 --- diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index 31c40731c..b73a7559e 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -2422,6 +2422,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError // if ($video && $this->fluidbookSettings->mobileVideosPath != '') { // // } + $origDir = $this->wdir; $types = $this->getVideosFormats(); if ($video) { diff --git a/app/Fluidbook/Link/LinksData.php b/app/Fluidbook/Link/LinksData.php index b9d3b5ba6..fe4498ebe 100644 --- a/app/Fluidbook/Link/LinksData.php +++ b/app/Fluidbook/Link/LinksData.php @@ -42,6 +42,7 @@ class LinksData 'type' => __('Type'), 'to' => __('Destination'), 'target' => __('Cible'), 'tooltip' => __('Infobulle'), 'numerotation' => __('Numérotation'), 'display_area' => __('Activer la surbrillance'), + 'tracks' => __('Sous-titres'), 'video_loop' => __('Video : boucle'), 'video_auto_start' => __('Video : démarrage automatique'), 'video_controls' => __('Vidéo : afficher les contrôles'), 'video_sound_on' => __('Vidéo : activer le son'), 'inline' => __('Vidéo : afficher dans la page'), 'video_width' => __('Vidéo : Largeur du popup'), 'video_height' => __('Vidéo : Hauteur du popup'), 'visibility_os' => __('Visible sur les systèmes'), @@ -702,6 +703,7 @@ class LinksData 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, + 'tracks' => '', 'tooltip' => '', 'numerotation' => 'physical', "inline" => 'inline', diff --git a/app/SubForms/Link/Base.php b/app/SubForms/Link/Base.php index 90b6b0ac6..43ced01ee 100644 --- a/app/SubForms/Link/Base.php +++ b/app/SubForms/Link/Base.php @@ -54,6 +54,7 @@ class Base extends Form protected static $_acceptImageAndZip = ['.jpg', '.jpeg', '.png', '.svg', '.gif', '.zip']; protected static $_acceptAnimation = ['.jpg', '.jpeg', '.png', '.svg', '.gif', '.zip', '.oam', '.html', '.json', '.pdf']; protected static $_acceptVideo = ['.mp4']; + protected static $_acceptSubtitles = ['.vtt']; protected static $_acceptFont = ['.otf', '.ttf']; protected static $_acceptAudiodescription = ['.mp3', '.txt']; protected static $_acceptAudio = ['.mp3']; diff --git a/app/SubForms/Link/Video.php b/app/SubForms/Link/Video.php index aa02c51bf..a4599a3ef 100644 --- a/app/SubForms/Link/Video.php +++ b/app/SubForms/Link/Video.php @@ -5,6 +5,7 @@ namespace App\SubForms\Link; use App\Fluidbook\Link\Link; use Cubist\Backpack\Magic\Fields\CheckboxBasic; use Cubist\Backpack\Magic\Fields\FilesOrURL; + // __('!! Editeur de liens') class Video extends Base { @@ -15,6 +16,7 @@ class Video extends Base public function addDestinationField() { $this->addField('to', FilesOrURL::class, __('Fichier vidéo'), $this->getFilesOrURLEntry() + ['accept' => self::$_acceptVideo]); + $this->addField('tracks', FilesOrURL::class, __('Sous-titres'), $this->getFilesOrURLEntry() + ['accept' => self::$_acceptSubtitles]); } public function addMultimediaFields()