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

CommentFileSizeAuthor
#13 playlist.patch687 bytespsmx
#12 playlist.patch714 bytespsmx
#7 playlist.patch759 bytespsmx
video_splash.patch1.28 KBbkat
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

parasox’s picture

Also 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. :)

bkat’s picture

Version: 6.x-4.x-dev » 6.x-4.1-rc6

Sorry, its actually rc6 that I did this on.

parasox’s picture

Patch 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!

heshanlk’s picture

Status: Active » Reviewed & tested by the community
heshanlk’s picture

Status: Reviewed & tested by the community » Patch (to be ported)
dotsam’s picture

This 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:

     } elseif($thumbnail->filepath == '') {
		$thumbnail->url = '';
    }

This correctly bypasses the playlist generation committed by this patch and instead renders the clip without a thumbnail.

psmx’s picture

FileSize
759 bytes

I was also looking for a fix of this issue.

I fixed by changing line 191 in video_formatter.inc from

if (!$video->autoplay && $video->thumbnail->url) {

to

 if (!$video->autoplay && $video->thumbnail->url && file_exists($video->thumbnail->url)) {

This renders the video normally and shows a thumbnail which surprsingly always worked for me, even before this path was submitted to HEAD.

parasox’s picture

"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.

heshanlk’s picture

Status: Patch (to be ported) » Needs review
psmx’s picture

Yes 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.

tacituseu’s picture

Status: Needs review » Needs work

The patch in #7 seems to be diff'ed the wrong way (new -> old).

psmx’s picture

Status: Needs work » Needs review
FileSize
714 bytes

You are right. My bad. Attached new version.

psmx’s picture

FileSize
687 bytes

And again.

Natkeeran’s picture

#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.

Jorrit’s picture

Status: Needs review » Postponed (maintainer needs more info)

What's the value of $video->thumbnail->url when file_exists($video->thumbnail->url) returns false?

Jorrit’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Closed because of lack of response.

gajanannehul’s picture

Thanks psmx, i am having same problem and your patch work for me!