typo3 7: PreviewImage of a Vimeo Video

April 25, 2016 at 07:23

What I wanted to do was create a video gallery with all vimeo videos. For that I needed a preview image for each videos. Interestingly enough Typo3 offers a VimeoHelper! This can easily be used in a viewHelper:

     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $video
     * @return string
    public function render($video) {
        $helper = new \TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\VimeoHelper();
        $tmp = $helper->getPreviewImage($video->getOriginalResource()->getOriginalFile());
        return $tmp;

Tags: filereference helper typo3 7 videos vimeo

Hinterlasse einen Kommentar: