[BUGFIX] Allow Video Text Tracks files
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / FlowPlayerContentObject.php
index 8782c19..07d670d 100644 (file)
@@ -333,7 +333,7 @@ class FlowPlayerContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstract
                // Configure captions
                if ($conf['type'] === 'video' && isset($conf['caption'])) {
                        // Assemble captions track tag
-                       $videoCaptions = '<track id="' . $replaceElementIdString . '_captions_track" kind="captions" src="' . $conf['caption'] . '"></track>' . LF;
+                       $videoCaptions = '<track id="' . $replaceElementIdString . '_captions_track" kind="captions" src="' . $conf['caption'] . '" default="default" />' . LF;
                        // Add videoJS extension for captions
                        $pageRenderer->addJsFile(TYPO3_mainDir . 'contrib/videojs/video-js/controls/captions.js');
                        // Flowplayer captions
@@ -504,6 +504,7 @@ class FlowPlayerContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstract
                        track.setAttribute("src", "' . $conf['caption'] . '");
                        track.setAttribute("id", "' . $replaceElementIdString . '_captions_track");
                        track.setAttribute("kind", "captions");
+                       track.setAttribute("default", "default");
                        ' . $replaceElementIdString . '_video_js.appendChild(track);';
                                                }
                                                $videoTagAssembly .= '