Recently i have been working on a project where to get youtube videos. I have to make ajax way .I make a jquery plugin to get the videos. here is the demo example of jquery youtube plugin example demo.
You will get the full description here .
Here i give you brief description about the plugin and must be know that it will be change after getting your comments, suggestions.
About jquery youtube Plugin
jquery youtbe plugin is a javascript interface for Google YOUTUBE API written by jquery. Now it is alpha version .
Watch Demo Example
Rrquirements
- requires jQuery 1.1.1 or latest package.
- require jquery BlockUI plugin (optional but now it use to play the video).
Features (sample)
- no server-side script required..
- easy to implement:
$("#myDivId").youtube(); - support customs configaration :
$("#myDivId").youtube( { type :'search', keyword :'searchWord' } ); - support custom callback function youtube(
$("#myDivId").youtube( { type :'users', keyword : 'searchWord', callback : 'myFunction' } ); - supports paging result, most viewd youtube and many more.
- Builtin BlockUI plugin
- Run video inline or link to the youtbue.
If you have question or comments, please use the commetns here jquery plugin comments to the jQuery mailing list, or send me an (bijon_php@yahoo.com)email.
Downlaod:
jQuery youtube, Alpha 1 Uncompressed
Configaration Settings
| Settings | Default | Type | Options | Explanation |
| type | null | string | search,usres,playlist,category | allowed what type of video you want |
| keyword | null | string | optional | search keyword |
| playlist_id | null | string | ||
| url | null | string | specific url of vidoes | |
| start_index | null | int | This is used for paging . From which you want start | |
| max_results | null | int | return maximum videios | |
| format | null | string | ||
| most_viewed | ||||
| top_rated | ||||
| recently_featured | ||||
| top_favorites | ||||
| most_discussed | ||||
| most_linked | ||||
| most_responded | ||||
| inlineVideo | true | boolean | do you want to redirect to youtube, or play inlinevideo | |
| blockUI | true | boolean | do you want to playVideo in block UI |
Super cool demo. All it needs is a little pagination and you’ve really got
something there!
– Josh
Hi brilliant,
Excellent work!
It’s really a time-saving, helpful tool for web developers.
2 suggestion:
i. The theme u r using now have a large right bar. which results, some of text and last column of “Configaration Settings” is not displaying properly. You can change the theme or manage contents to be fit with this theme.
ii. Your code examples, which r really helpful and impressive, r displaying with a very small font. A bit larger font can make it more readable.
Thanks a lot for this nice script.
– Anis
Please help me about sql injection. How to secure from injection in searching.
Hi Saidur, great thanks for releasing this, have integrated into my website: http://www.tunerami.com
thanks.
Hello,
I have a problem with the plugin.
I can see the videos which are found but when I try playing one of them a “Please wait…” is shown and nothing happens. Do somebody knows where the problem is?
@Stoyan
You must not use a newer version of blockUI plug-in. Do download it in example page.(http://bijon.rightbrainsolution.com/youtube/tube.html)
Hi. This plugin is brilliant.
I started to use this and jquery as well (completely newbie). and I found I cannot make the video use the css I want. I mange to increase the size of the displayed video but the rounded box remains small compared to the video. BTW I am using the file Samgu Lee mentioned, not the newest version of blockUI.
None of the styled css is in the blockUI window.
Any ideas on how to fix this?
best regards,
Hi again. I asked for this also in the jquery google groups and they got me an aswer that seems to be correct. I mention this because there is something else to modify.
The idea is to upgrade to the new BlockUI version and modify the youtube plugin code.
http://groups.google.com/group/jquery-en/browse_thread/thread/fefa15727ca1bdf0
Regards
@notuo , thanks to review the plugin. Well very soon i will modify the code and add new feature of the plugin.
Your jQuery YouTube plugin is fantastic! Do you have an example of utilizing an inline player as opposed to the lightbox/modal window (for example: Player on one side of page, results on the other side)…or suggest any particular plugin to accomplish this?
I love the idea of this plugin, but I can’t get it to do anything other than a search based query.
I would like to have a simple display of my last ten favorites from my account, but I can’t figure out how to configure that. Could you give me any help with that?
Thanks for all of your hard work!
how can I get “orderby” to work?
nevermind, i figured it out. if anyone else wants to add this, open the .js file and add the following under if (config.max-results)
if (config.orderby)
{
url +=’&orderby=’+ config.orderby;
}
@reid thanks a lot for your solution and share it. This is the beauty of open source projects.