We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin: Video Player Thumbnail Youtube, Myspace, Vimeo, Veoh, Revver, MetaCafe

Development and Programming

bryan2jumpstart's avatar
bryan2jumpstart
98 posts
16 years ago
bryan2jumpstart's avatar bryan2jumpstart

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.

       
JArment's avatar
JArment
131 posts
16 years ago
JArment's avatar JArment

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

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill

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?

       
bryan2jumpstart's avatar
bryan2jumpstart
98 posts
16 years ago
bryan2jumpstart's avatar bryan2jumpstart
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.

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill
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!

       
kellypacker's avatar
kellypacker
138 posts
16 years ago
kellypacker's avatar kellypacker

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"}
            
   <a href="http://www.youtube.com/watch?v={youtube-id}&hl=nl&fs=1&rel=0&hd=1&autoplay=1class=popup">_      {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.

       
bryan2jumpstart's avatar
bryan2jumpstart
98 posts
16 years ago
bryan2jumpstart's avatar bryan2jumpstart

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.

       
rick.prince's avatar
rick.prince
111 posts
about 16 years ago
rick.prince's avatar rick.prince

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

       
anonymous61630's avatar
anonymous61630
93 posts
15 years ago
anonymous61630's avatar anonymous61630

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.

       
bryan2jumpstart's avatar
bryan2jumpstart
98 posts
15 years ago
bryan2jumpstart's avatar bryan2jumpstart
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?

       
bryan2jumpstart's avatar
bryan2jumpstart
98 posts
15 years ago
bryan2jumpstart's avatar bryan2jumpstart
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.

       
anonymous61630's avatar
anonymous61630
93 posts
15 years ago
anonymous61630's avatar anonymous61630
{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.

       
bryan2jumpstart's avatar
bryan2jumpstart
98 posts
15 years ago
bryan2jumpstart's avatar bryan2jumpstart
{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?

       
anonymous61630's avatar
anonymous61630
93 posts
15 years ago
anonymous61630's avatar anonymous61630

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 😊

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

       
bryan2jumpstart's avatar
bryan2jumpstart
98 posts
15 years ago
bryan2jumpstart's avatar bryan2jumpstart
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 😊 Works like a charm now! Thanks for a nifty plugin.

Great to hear glad you like it.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.