]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7259 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Apr 2025 17:47:51 +0000 (19:47 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Apr 2025 17:47:51 +0000 (19:47 +0200)
app/Fluidbook/Compiler/Compiler.php
app/Fluidbook/Link/LinksData.php
app/SubForms/Link/Base.php
app/SubForms/Link/Video.php

index 31c40731c993edcbe1ac72c55c92d90393df7087..b73a7559e74695c32cdee0a15a70554ceaf8c68e 100644 (file)
@@ -2422,6 +2422,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError
 //        if ($video && $this->fluidbookSettings->mobileVideosPath != '') {
 //
 //        }
+
         $origDir = $this->wdir;
         $types = $this->getVideosFormats();
         if ($video) {
index b9d3b5ba6c2ce61d28820017322a88990b495d5c..fe4498ebe89f8e7e7692680b582be9b9cba4f344 100644 (file)
@@ -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',
index 90b6b0ac6679852e576964cb8d22f867c7f805cc..43ced01ee7fd13d577ddc6b9dfc55610a5066318 100644 (file)
@@ -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'];
index aa02c51bfbde03a283443451a92b5e2da2d0a837..a4599a3efdc0d2fb19607c2560fecab9f2414635 100644 (file)
@@ -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()