gornycreative Posted April 24, 2023 Share Posted April 24, 2023 Just curious if this module is still active/stable? It doesn't appear in the modules directory - I only found it through searching the forum. Thanks, J Link to comment Share on other sites More sharing options...
adrian Posted May 8, 2023 Author Share Posted May 8, 2023 @gornycreative - I haven't used it in quite some time, but I think it should still work. Link to comment Share on other sites More sharing options...
neophron Posted November 2, 2023 Share Posted November 2, 2023 Struggling with page reference inside repeater Hi, since the video files are usually bigger then some jpgs, I wanted to reuse uploaded video files on a website. There is a page reference field select_video inside a repeater. The file field for the videos is video_field. In a hidden page "video-container" are hidden child pages. Each child pages has a single video. I want to show each video via the page reference (inside a repeater) on a different page. In the field video_field under Basics -> Type the option Files is active. This is my code, where only headline and body_second are rendered. <? foreach ($page->repeater_headline_movie_text as $item) : ?> <h3><?= $item->headline; ?></h3> <article class="video_article"> <?php if ($item->select_video->id) : ?> <?php $file = $item->video_field; if($file) { echo "<video width='{1280}' height='{710}' poster='{$file->video_field->poster}' controls='controls' preload='yes'> <source type='video/mp4' src='{$file->video_field->url}' /> <track kind='subtitles' src='{subtitles}' srclang='de' /> </video> "; } ?> <?php endif; ?> <div class="textwrapper"> <?= $item->body_second; ?> </div> </article> <? endforeach; ?> Link to comment Share on other sites More sharing options...
adrian Posted November 2, 2023 Author Share Posted November 2, 2023 At a quick glance, it feels like you are missing a level when getting the video. You need to get the video_field from the select_video, but instead you are getting video_field from $item. Does that sound right? Link to comment Share on other sites More sharing options...
neophron Posted November 2, 2023 Share Posted November 2, 2023 1 hour ago, adrian said: At a quick glance, it feels like you are missing a level when getting the video. You need to get the video_field from the select_video, but instead you are getting video_field from $item. Does that sound right? Hi Adrian, thanks for your suggestion. Yes, now I see what's missing. The logic must be: Select the page, check if there is a field video_field inside and render the content. And I think that this php-logic causes me headache ? Link to comment Share on other sites More sharing options...
Laegnur Posted December 12, 2023 Share Posted December 12, 2023 Hello I am trying to use this module on a site. And I am getting the following error when trying to add a video to a page. - Param given by constructor is not valid gd resource Any clue what this is? [UPDATE] I replace the content of the folder ffmpeg-php inside the module, for a recent version of this library, and this solve that issue. And edit the line 114 of the file InputfieldVideo.module.php to prevent a PHP error about Implicit conversion from float to int From this $duration = gmdate("H:i:s", $media->getDuration()); To this $duration = gmdate("H:i:s", intval($media->getDuration())); 2 Link to comment Share on other sites More sharing options...
adrian Posted December 13, 2023 Author Share Posted December 13, 2023 Thanks @Laegnur - I have committed those changes to the repo. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now