Skip to content

Commit

Permalink
Media Player: Fix and add poster
Browse files Browse the repository at this point in the history
  • Loading branch information
Kajetan Dvoracek committed May 18, 2022
1 parent ab0c4f3 commit 405e225
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/MediaPlayerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected function getVideoInfo(Doc $doc, int $pageNo): ?array
$videoUrl = [];
$thumbFiles = $this->findFiles($doc, 0, $thumbFileGroups);
if (!empty($thumbFiles)) {
$videoUrl['poster'] = urldecode($doc->getFileLocation($thumbFileIds[0]['fileId']));
$videoUrl['poster'] = urldecode($doc->getFileLocation($thumbFiles[0]['fileId']));
}

return [
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/MediaPlayer/Main.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<kitodo:mediaPlayerConfig id="MEDIA_CONFIG" settings="{settings}" />

<div id="tx-dlf-view" class="tx-dlf-view">
<slub-media id="{settings.elementId}" fullscreen-element="tx-dlf-view" config="MEDIA_CONFIG" start="{video.start}" mode="auto" mode-fallback="{video.mode}">
<slub-media id="{settings.elementId}" fullscreen-element="tx-dlf-view" poster="{video.url.poster}" config="MEDIA_CONFIG" start="{video.start}" mode="auto" mode-fallback="{video.mode}">
<f:comment>NOTE: If one of these doesn't exist, the player will try the next one.</f:comment>
<f:for each="{video.sources}" as="source">
<source src="{source.url}" type="{source.mimeType}">
Expand Down

0 comments on commit 405e225

Please sign in to comment.