Plugin: Video Player Thumbnail Youtube, Myspace, Vimeo, Veoh, Revver, MetaCafe
Posted: 05 March 2010 01:36 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009

Video Player Thumb is a plugin that lets you easily get the thumbnail for Youtube, Vimeo, Dailymotion, Veoh, MySpace, Metacafe and Revver videos, from the video URL. This is basically an extension on Benjamin David’s plugin and much thanks to him for that code. I have just substituted the request with ones to get the thumbnails as I was created a video gallery that links to a full page that then uses Benjamin’s plugin to get the embed code.

Video Player is available on EE 1.6 AND EE 2.0 (Thanks Dave for the addition)

Notice : You have to set the Weblog/Channel preference “Automatically turn URLs and email addresses into links?” to “No”  in order to make the plugin work

The Single Tag

{exp:videoplayerthumb:thumb src="http://www.youtube.com/watch?v=h1qYN3YtPfU"

The Tag Pair

{exp:videoplayerthumb:thumb src="http://www.youtube.com/watch?v=h1qYN3YtPfU"}
{videothumb_url}
{
/exp:videoplayerthumb:thumb} 

Way to use with imgsizer

{exp:videoplayerthumb:thumb src="{video_link}" parse="inward"}
                      {exp
:imgsizer:size src="{videothumb_url}" width="100" height="100" alt="" remote="on"}
                  {
/exp:videoplayerthumb:thumb} 

Tag Parameters

src= [REQUIRED] The URL of the Youtube, Vimeo or Daily motion video you want to embed in the player.
url_only= (optional) If set to yes the plugin will only output a remote url to the file so you can use the imsizer plugin with it. Best way is to embed the imgsizer plugin in another template and pass the result from the videoplayerthumb to it.

There are no height or width parameters in this plugin has you are better off using the imgsizer plugin to resize them.

File Attachments
pi.videoplayerthumb.zip  (File Size: 3KB - Downloads: 369)
videoplayerthumb2.zip  (File Size: 3KB - Downloads: 339)
 Signature 

JumpStart Web Services

Profile
 
 
Posted: 08 March 2010 10:44 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  151
Joined  09-15-2008

Very cool. I haven’t gotten to use this yet, but I definitely will try it out soon.

 Signature 

Jim Arment
http://jarment.com · http://canyoncreekonline.com

Profile
 
 
Posted: 08 March 2010 02:14 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  524
Joined  09-06-2006

Very cool! thanks. I just put in a feature request to Vimeo a couple of weeks ago to provide access to the thumbnails.

I gave this a quick test and I got a 200px image. Would you have any idea if the full size preview image is accessible?

 Signature 

Kyle Summer | smartpill design | New Haven, CT |  twitter

Profile
 
 
Posted: 08 March 2010 02:21 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009
smartpill - 08 March 2010 07:14 PM

Very cool! thanks. I just put in a feature request to Vimeo a couple of weeks ago to provide access to the thumbnails.

I gave this a quick test and I got a 200px image. Would you have any idea if the full size preview image is accessible?

Just uploaded a new version that pulls the large image from vimeo.

 Signature 

JumpStart Web Services

Profile
 
 
Posted: 08 March 2010 02:28 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  524
Joined  09-06-2006
bryan2jumpstart - 08 March 2010 07:21 PM
smartpill - 08 March 2010 07:14 PM

Very cool! thanks. I just put in a feature request to Vimeo a couple of weeks ago to provide access to the thumbnails.

I gave this a quick test and I got a 200px image. Would you have any idea if the full size preview image is accessible?

Just uploaded a new version that pulls the large image from vimeo.

Perfect!

 Signature 

Kyle Summer | smartpill design | New Haven, CT |  twitter

Profile
 
 
Posted: 05 April 2010 03:15 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  192
Joined  01-11-2009

I have been trying to get this work for too long, any help would be appreciated. I can’t get the imagesizer to work with this plugin.

My videos:

{exp:weblog:entries weblog="videos" dynamic="off" disable="categories|member_data|pagination|trackbacks"}
            
   
<class="popup" href="http://www.youtube.com/watch?v={youtube-id}&amp;hl=nl&amp;fs=1&amp;rel=0&amp;hd=1&amp;autoplay=1">
      
{exp:videoplayerthumb:thumb src="http://www.youtube.com/watch?v={youtube-id}" parse="inward" url_only="yes"}
         {embed
="patient-resources/_thumb" thumb="{videothumb_url}"}
      {
/exp:videoplayerthumb:thumb}
            
</a>
{/exp:weblog:entries} 

my thumb embed template:

{exp:imgsizer:size src="{embed:thumb}" width="200" height="200" alt="" remote="on"

Image sizer is working. Anyone see any glaring mistakes in this plugin code? If not, at least I know to look elsewhere? Thanks for any help.

 Signature 

Kelly Packer
creativesoapbox.com | kellypacker.com

Profile
 
 
Posted: 06 April 2010 09:35 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009

ktrain,

Below is the code I use and it runs perfectly.

{exp:weblog:entries weblog="videos" paginate="bottom" limit="1" dynamic="off" orderby="entry_date" sort="desc" show_expired="yes" show_future_entries="yes" status="not closed"}
{exp
:videoplayerthumb:thumb src="{video_link}" parse="inward"}
{exp
:imgsizer:size src="{videothumb_url}" width="100" height="100" alt="" remote="on"}
{
/exp:videoplayerthumb:thumb}
{
/exp:weblog:entries} 

The only things I can think of is that the parsing order with the embed might be off. Try not using an embed for the thumbnail creation.

 Signature 

JumpStart Web Services

Profile
 
 
Posted: 26 April 2010 11:48 PM   [ Ignore ]   [ # 7 ]  
Lab Assistant
RankRank
Total Posts:  152
Joined  07-18-2007

Any chance you could make the ALT attribute available with the single tag?

Profile
 
 
Posted: 28 May 2010 06:11 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  126
Joined  03-07-2008

Could not get it to work with the imgsizer plugin. Very frustrating. Could not troubleshoot either because no errors were given in the template debugging output. Sigh.

Profile
 
 
Posted: 28 May 2010 10:08 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009
Florian Schroiff - 28 May 2010 10:11 AM

Could not get it to work with the imgsizer plugin. Very frustrating. Could not troubleshoot either because no errors were given in the template debugging output. Sigh.

It’s a simple plugin that does not provide any debugging, can you provide some code?

 Signature 

JumpStart Web Services

Profile
 
 
Posted: 28 May 2010 10:08 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009
rick.prince - 27 April 2010 03:48 AM

Any chance you could make the ALT attribute available with the single tag?

RIck just saw yourr comment,I will try to squeeze this in.

 Signature 

JumpStart Web Services

Profile
 
 
Posted: 28 May 2010 10:17 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  126
Joined  03-07-2008
{exp:weblog:entries weblog="videos" paginate="bottom" limit="20" dynamic="off" orderby="entry_date" sort="desc" show_expired="yes" show_future_entries="yes" status="not closed"}
{exp
:videoplayerthumb:thumb src="{video_link}" parse="inward"}
{exp
:imgsizer:size src="{videothumb_url}" width="100" height="100" alt="" remote="on"  alt="{title}" base_cache="/path/to/cache/folder/img/sized"}
{
/exp:videoplayerthumb:thumb}
{
/exp:weblog:entries} 

Returns nothing for me. Server runs PHP Version 5.3.1, EE 1.6.9 Core.

Profile
 
 
Posted: 28 May 2010 11:04 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009
Florian Schroiff - 28 May 2010 02:17 PM
{exp:weblog:entries weblog="videos" paginate="bottom" limit="20" dynamic="off" orderby="entry_date" sort="desc" show_expired="yes" show_future_entries="yes" status="not closed"}
{exp
:videoplayerthumb:thumb src="{video_link}" parse="inward"}
{exp
:imgsizer:size src="{videothumb_url}" width="100" height="100" alt="" remote="on"  alt="{title}" base_cache="/path/to/cache/folder/img/sized"}
{
/exp:videoplayerthumb:thumb}
{
/exp:weblog:entries} 

Returns nothing for me. Server runs PHP Version 5.3.1, EE 1.6.9 Core.

Can you verify that your video weblog is returning a url to the video? Can you also verify that your imgsizer plugin works with a normal image and also test a remote image?

 Signature 

JumpStart Web Services

Profile
 
 
Posted: 28 May 2010 02:37 PM   [ Ignore ]   [ # 13 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  126
Joined  03-07-2008

Hey Bryan,
thanks for pushing me to test some more. I found the problem: my base_cache path needed a trailing slash! So it was an imgsizer issue and not the fault of your plugin smile

Works like a charm now! Thanks for a nifty plugin.

Profile
 
 
Posted: 28 May 2010 04:19 PM   [ Ignore ]   [ # 14 ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009
Florian Schroiff - 28 May 2010 06:37 PM

Hey Bryan,
thanks for pushing me to test some more. I found the problem: my base_cache path needed a trailing slash! So it was an imgsizer issue and not the fault of your plugin smile

Works like a charm now! Thanks for a nifty plugin.

Great to hear glad you like it.

 Signature 

JumpStart Web Services

Profile
 
 
Posted: 21 June 2010 06:20 AM   [ Ignore ]   [ # 15 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  716
Joined  09-20-2009

Isn’t this the same as doing

{exp:imgsizer:size src="http://img.youtube.com/vi/{gallery_youtube}/0.jpg" width="208" height="104" remote="on"

- works for me, and returns a higher resolution image (assuming gallery_youtube is a custom field that holds the video id

 Signature 

Exp:resso custom development for ExpressionEngine, by Crescendo.
Check out Exp:resso Store - e-commerce done right

Profile
 
 
Posted: 21 June 2010 08:14 AM   [ Ignore ]   [ # 16 ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009
DaveNZ - 21 June 2010 10:20 AM

Isn’t this the same as doing

{exp:imgsizer:size src="http://img.youtube.com/vi/{gallery_youtube}/0.jpg" width="208" height="104" remote="on"
- works for me, and returns a higher resolution image (assuming gallery_youtube is a custom field that holds the video id

Yeah but this handles not only youtube but myspace, vimeo, veoh, revver and metacafe.

 Signature 

JumpStart Web Services

Profile
 
 
Posted: 01 July 2010 11:05 PM   [ Ignore ]   [ # 17 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  894
Joined  12-04-2007

(for ee 1.6) pi.videoplayerthumb.zip
(for ee 2.0) videoplayerthumb2.zip

right?

Profile
 
 
Posted: 01 July 2010 11:11 PM   [ Ignore ]   [ # 18 ]  
Lab Assistant
RankRank
Total Posts:  105
Joined  02-05-2009
Bmovie - 02 July 2010 03:05 AM

(for ee 1.6) pi.videoplayerthumb.zip
(for ee 2.0) videoplayerthumb2.zip

right?

You got it.

 Signature 

JumpStart Web Services

Profile