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

Video Player plugin for Youtube, Vimeo, Dailymotion, Veoh, MySpace & more

Development and Programming

Benjamin David's avatar
Benjamin David
77 posts
16 years ago
Benjamin David's avatar Benjamin David

Hi Mario, I updated the post so you can download the plugin for EE 2.0. I forgot it was on a private forum 😊

       
Mario Rodríguez's avatar
Mario Rodríguez
72 posts
16 years ago
Mario Rodríguez's avatar Mario Rodríguez

Hi Benjamin,

Thanks, I appreciate it 😊

Cheers

       
code72's avatar
code72
104 posts
16 years ago
code72's avatar code72

Works great. Thanks so much!

       
Benjamin David's avatar
Benjamin David
77 posts
16 years ago
Benjamin David's avatar Benjamin David

Video Player 1.1 is out and new services are being supported. The plugin now works with : Youtube, Vimeo, Dailymotion, Veoh, MySpace, Metacafe, Revver

The script has also been optimized with regular expression for a better detection of the video id in URLs.

I’ve made some tests for each service but please tell me if you have problems or if some URLs don’t work with the new version.

By the way, I’ve uploaded the files in a TGZ format because the forum didn’t let me upload a ZIP format saying that there was a problem with the MIME. I tried to zip the folder in the Finder of Mac OS X and through the Terminal but each time I had this error :

Error Message: The file you are attempting to upload has invalid content for its MIME type.

Thanks for helping !

       
Benjamin David's avatar
Benjamin David
77 posts
16 years ago
Benjamin David's avatar Benjamin David
Thanks Benjamin! I was searching for a descent Vimeo solution for Expression Engine. This might be a bug?: When using the URL for the video, be sure not to use ‘www.’ So
{exp:videoplayer src="http://vimeo.com/658158" width="800" height="600"}
Instead of:
{exp:videoplayer src="http://www.vimeo.com/658158" width="800" height="600"}

Hi Steef, I thought you would be happy to learn that Video Player 1.1 has a better support for Vimeo URLs and now works with Channels, Groups or Single video URLs like these :

http://vimeo.com/channels/whitehouse#8626897
http://vimeo.com/8564125
http://vimeo.com/groups/anamorphic/videos/8617136
http://vimeo.com/groups/21146/videos/6003506

Hope you’ll like it !

       
OutofControl's avatar
OutofControl
164 posts
16 years ago
OutofControl's avatar OutofControl

Based on my research and annoyance at Video Embed’s not validating in XHTML strict, I modified your code to use the following HTML setup:

$out = '<object type="application/x-shockwave-flash" style="width: '.$width.'px; height: '.$height.'px;" data="'.$video_url.'"><param name="movie" value="'.$video_url.'"></param></param></object>';

Note that wmode : transparent is in there so that Modal boxes will play nicely with the embedded players and show up on top of them instead of behind them. This is tested on Windows IE7 & 8 and FF, and on Mac FF and Safari. If you find this useful, you are more than welcome to use it in the plugin.

       
graefika's avatar
graefika
5 posts
16 years ago
graefika's avatar graefika

This is what I have in my template:

{exp:videoplayer video-content width="400" height="400"}

Is that even right?

Or should it be this?

{exp:videoplayer src="{video-content}" width="400" height="400"}

I’ll attach a screen of my Custom Field and Edit screens. Do not understand why this can’t seem to connect right. I was under the impression that whatever is contained within the brackets { } - in this case the url that’s in the ‘video-content custom field’ - is pulled in and output by EE.

I’m new and trying to set this up correctly. What I have thus far will not work and it;s likely something dumb:

<div id=”article-detail” class=”grid_12”>

{exp:weblog:entries weblog="news_articles" limit="1" status="Open | Top Story | Featured Top Story"} <h2 class=”article-title”>{title}</h2> <h3 class=”article-author”>By {author}</h3>

{article-body}

{exp:videoplayer src={video-content} width=”400” height=”400”}

{/exp:weblog:entries}

</div>

All I want to do is to have the ability to include a youtube or vimeo vid in my news article “Full Story” template if the author wishes to. When I paste my youtube video url into my text input custom field called “video-content” nothing shows up.

When I use Benjamin’s example code it works just fine, though: His example code that works: {exp:videoplayer src=”http://www.youtube.com/watch?v=cTpUVAcvWfU” width=”800” height=”600”}

This example code sticks a video window in my page so it seems to be working but I am having a hard time understanding how to set up my own code so that it pulls in the youtibe link from my custom field which is called: “video-content”. I thought that whatever URL was pasted into the “video-content” custom field was dynamically stuck in the ‘video-content’ tag which then output the video in my page. Anyone know what I’m getting wrong? I think it has something to do with putting “src=” right after “exp:videoplayer”…once that’s pulling from the right place it oughta work, huh?

AN UPDATE -

Apparently the plugin was working all the time; I just deleted all my entries and made a brand new one and THIS time it seemed to work. This is the code I set up in my View Detail template:

<div id=”article-detail” class=”grid_12”>

{exp:weblog:entries weblog="news_articles" limit="1" status="Open | Top Story | Featured Top Story"} <h2 class=”article-title”>{title}</h2> <h3 class=”article-author”>By {author}</h3>

{article-body}

{exp:videoplayer src="{video-content}” width=”400” height=”400”}

{/exp:weblog:entries}

</div>

It outputs this page and now the video shows up inline at the bottom of the page: http://nerkin.com/news_articles/view/a_piece_of_george_orwell/

Granted, I still have to mess with the video size to get it to fit right in my layout, but I’m doing better now.

So, if the plugin doesn’t work right away, try to make a brand new blog post once your settings are correct and see if it works after that. In my case - it did!

PS: I have not tried this with anything other than a YouTube video.

       
Benjamin David's avatar
Benjamin David
77 posts
16 years ago
Benjamin David's avatar Benjamin David

Hi graefika, I think you may not have set up a weblog parameter correctly. In the weblog posting preferences, turn the “Automatically turn URLs and email addresses into links?” option to “No”. (Sorry, I’ve just seen your screenshots, skip to the second solution)

Also, make sure that the video-content field formatting is set to None. Also, this field should only contain the video url.

Hope this helps !

       
Benjamin David's avatar
Benjamin David
77 posts
16 years ago
Benjamin David's avatar Benjamin David
Based on my research and annoyance at Video Embed’s not validating in XHTML strict, I modified your code to use the following HTML setup:
$out = '<object type="application/x-shockwave-flash" style="width: '.$width.'px; height: '.$height.'px;" data="'.$video_url.'"><param name="movie" value="'.$video_url.'"></param></param></object>';
Note that wmode : transparent is in there so that Modal boxes will play nicely with the embedded players and show up on top of them instead of behind them. This is tested on Windows IE7 & 8 and FF, and on Mac FF and Safari. If you find this useful, you are more than welcome to use it in the plugin.

Thanks for your feedback, i’ll pack it as an option in the next build !

       
julzmon's avatar
julzmon
44 posts
16 years ago
julzmon's avatar julzmon

Great plug-in thanks!

       
MINDSCREEN's avatar
MINDSCREEN
218 posts
16 years ago
MINDSCREEN's avatar MINDSCREEN

Thank you very much for your plugin, we r testing the use of this plugin in one site. I have one query to u, Pls, visit the testing link http://www.bioedge.org/index.php/site/video/

Is it possible to set the Video in different alignment instead of main image as other articles? It will be very much helpful, if it can be done. Pls, reply.

       
MINDSCREEN's avatar
MINDSCREEN
218 posts
16 years ago
MINDSCREEN's avatar MINDSCREEN

Thank you very much for your plugin, we r testing the use of this plugin in one site. I have one query to u, Pls, visit the testing link http://www.bioedge.org/index.php/site/video/

Is it possible to set the Video in different alignment instead of main image as other articles? It will be very much helpful, if it can be done. Pls, reply.

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

Very useful plugin. One of my clients wants to use this with http://qik.com/. I guess they have the ability to stream live from an iphone. The link structure looks similar to vimeo. If you could add this in that would be awesome. Thanks!

       
Benjamin David's avatar
Benjamin David
77 posts
15 years ago
Benjamin David's avatar Benjamin David

Video Player v1.2 has been released and adds a new function that let you get the details of the video such as : video id, video service name, embed code, and error.

Download Video Player v1.2

Video Player extras : Documentation - Changelog - Help

{exp:videoplayer src="http://www.youtube.com/watch?v=h1qYN3YtPfU"}
{exp:videoplayer src="http://www.youtube.com/watch?v=h1qYN3YtPfU" width="800" height="600"}
{exp:videoplayer:details src="http://www.youtube.com/watch?v=h1qYN3YtPfU"}
   {video_id}, {service}, {embed}, {error}
{/exp:videoplayer:details}

Thanks to OutOfControl, the embed has been modified. Thanks to Sarah, you can now play with the video id !

       
sm9's avatar
sm9
352 posts
15 years ago
sm9's avatar sm9

Hi Benjamin,

Just came across this plugin and have found it to work great, thanks.

I was hoping I could avoid having to turn off the auto-links at the weblog level, and instead, just use the EE Typography plugin to turn off the auto generated link URLs for just the video link field, but that didn’t seem to work unfortunately. No big deal though.

This is really minor, but any chance you could make the {service} tag output the text using the proper case? i.e. YouTube instead of youtube? Would look nicer if I outputted it, without needing to use the replace plugin! 😉

Also, this would make a great fieldtype for FieldFrame I think!

Thanks.

       
1 2 3

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.