Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I generally don't like videos to autoplay so I set that config option to false. However, when using flowplayer, this causes the video player to load up with no preview image. I find this really ugly so I modified theme_video_flv to display the thumbnail while waiting for the user to click play.
This basically entailed changing the flowplayer config from a clip to a playlist and inserting the thumbnail image as the first first clip in the playlist.
Patch is included
Comment | File | Size | Author |
---|---|---|---|
#13 | playlist.patch | 687 bytes | psmx |
#12 | playlist.patch | 714 bytes | psmx |
#7 | playlist.patch | 759 bytes | psmx |
video_splash.patch | 1.28 KB | bkat | |
Comments
Comment #1
parasox CreditAttribution: parasox commentedAlso having the same issue, think this patch will work on RC6?
I tried to get the latest dev working, but I ran into the issue described here: http://drupal.org/node/948050
So I downgraded to RC6. Very interested in this patch, as yeah, I don't want videos to play on page load, and I don't want a blank grey player either. :)
Comment #2
bkat CreditAttribution: bkat commentedSorry, its actually rc6 that I did this on.
Comment #3
parasox CreditAttribution: parasox commentedPatch works perfectly here, didn't even need to upload a new video to test on, it works on previously uploaded videos too.
Very nice!! Thanks!
Comment #4
heshanlkComment #5
heshanlkComment #6
dotsam CreditAttribution: dotsam commentedThis code exposes an error (200 stream not found) in Flowplayer when the "Automatically start video on page load" option is unchecked under admin/settings/video, and no thumbnail is selected for use with the video.
The video module passes flowplayer a playlist starting with an item like 'http://example.com/default/files/", which of course flowplayer cannot render.
I have remedied the error by inserting the following elseif() at line 105 of my video_helper.inc:
This correctly bypasses the playlist generation committed by this patch and instead renders the clip without a thumbnail.
Comment #7
psmx CreditAttribution: psmx commentedI was also looking for a fix of this issue.
I fixed by changing line 191 in video_formatter.inc from
to
This renders the video normally and shows a thumbnail which surprsingly always worked for me, even before this path was submitted to HEAD.
Comment #8
parasox CreditAttribution: parasox commented"which surprsingly always worked for me" Even if you set your videos to not auto start? I remember before bkat's patch all I would get was a black player, no thumbnail. Also it *might* be browser or even file type based (depending on what you encode to) as that's what happened to me using another video module (open media player and flashvideo modules) where sometimes the player would show me the first frame of the video, other times a black screen. But not a thumbnail.
Comment #9
heshanlkComment #10
psmx CreditAttribution: psmx commentedYes I started with video 6.x-4.1-rc6, so that was before bkat's patch. I don't do any transcoding and allow only .flv on my site, so that could be the reason. And yes, my player is set to not auto-start. Reading your post again, I see that my "thumbnail" is just the first frame of the video as you guessed. Anyway with the thumbnail patch video module was not working for me anymore, so I hope my patch can help to fix this issue.
Comment #11
tacituseu CreditAttribution: tacituseu commentedThe patch in #7 seems to be diff'ed the wrong way (new -> old).
Comment #12
psmx CreditAttribution: psmx commentedYou are right. My bad. Attached new version.
Comment #13
psmx CreditAttribution: psmx commentedAnd again.
Comment #14
Natkeeran CreditAttribution: Natkeeran commented#7 helped me with the 200 error.
However, I am not able to make the thumbnail as the splash. Tried the initial patch, but it did not work. Any suggestions.
Comment #15
Jorrit CreditAttribution: Jorrit commentedWhat's the value of $video->thumbnail->url when file_exists($video->thumbnail->url) returns false?
Comment #16
Jorrit CreditAttribution: Jorrit commentedClosed because of lack of response.
Comment #17
gajanannehul CreditAttribution: gajanannehul commentedThanks psmx, i am having same problem and your patch work for me!