IYoutube is a light plugin for you to play youtube video thru unity control. By using the light plugin, you just have to pass in the youtube url and others required parameter. This plugin will play the video on the iOS Movie Player natively if you pass in the correct parameter.
========================
======= IMPORTANT =====
========================
For some reason, youtube have update their new API and old version of iYoutube plugin does not seem to work anymore. I have update the plugin recently and publish to Unity Asset Store, you may grab the plugin from the hyperlink. Thanks :-)
PS : It is working for both iOS and Android now!!!
For some reason, youtube have update their new API and old version of iYoutube plugin does not seem to work anymore. I have update the plugin recently and publish to Unity Asset Store, you may grab the plugin from the hyperlink. Thanks :-)
PS : It is working for both iOS and Android now!!!
===================
====== Donation =====
===================
1. You can also make donation for using this plugin. Thanks you.
1. You can also make donation for using this plugin. Thanks you.
==================
== Support Platform ==
==================
1. iOS (Universal)
2. Android (Phone and Tablet)
3. Unity minimum version 4.1.3
3. Unity minimum version 4.1.3
Note* : Inside package will have a DemoScene, plugins and scripts folder. You can refer on how to use this function thru DemoScene or IYoutube unity script.
Any problem you encounter of integration plugin issue, please drop me an email (licco.wee@gmail.com)
Any problem you encounter of integration plugin issue, please drop me an email (licco.wee@gmail.com)
=======================
== Static Method Provided ==
=======================
/// <summary>
/// Play the youtube video.
/// </summary>
/// <returns>
/// Return true if the video play successful.
/// </returns>
/// <param name="url">youtube url, example http://www.youtube.com/watch?v=yCKSxEgz2XI </param>
/// <param name="quality">few quality available for youtube video, such as (hd720, medium, small). Pass in the correct string for quality
/// you need to play </param>
public static bool PlayVideo(string url, string quality);
/// <summary>
/// Gets the youtube thumbnail URL by youtube video url. This allow you to load the thumbnail texture by using unity WWW.
/// </summary>
/// <returns>
/// Return for the youtube thumbnial url.
/// </returns>
/// <param name='url'>youtube url, example http://www.youtube.com/watch?v=yCKSxEgz2XI
/// </param>
/// <param name='size'>
/// Size of the thumbnail > (default, medium, high and max), 4 selection for the thumbnail size.
/// </param>
public static string GetYoutubeThumbnailURLByURL(string url, string size);
/// <summary>
/// Gets the youtube thumbnail image by byte data.
/// </summary>
/// <returns>
/// Return for the thumbnail image data.
/// </returns>
/// <param name='url'>youtube url, example http://www.youtube.com/watch?v=yCKSxEgz2XI
/// </param>
/// <param name='size'>
/// Size of the thumbnail > (default, medium, high and max), 4 selection for the thumbnail size.
/// </param>
public static byte[] GetYoutubeThumbnailQuick(string url, string size);
Works very well. Nice and simple to use. And great support from the creator.
ReplyDeleteHi, can you make a plugin that can play live video streaming on an interface inside the game?
ReplyDeleteSeems to have trouble on iOS 5 on iPod4. Works fine on iPad3 with iOS6. Any ideas?
ReplyDeleteI think it has to do with an API change.
Deletehttps://developers.google.com/youtube/youtube-api-list
Hopefully the developer of this plugin is aware of the issue.
I was using this with no issues 5-7 days ago. Today I cannot seem to get a single video to play. I think Youtube has made an API change.
ReplyDeleteThanks to Licco for the quick reply and fix for this plugin. Everything is working perfectly.
DeleteIs this fix included in the download. If not would it be possible it could be posted up for others to use. Thanks
DeleteI'm having the same problem that Justin. Is there a fix or something?
ReplyDeletePlease, I have to publish my App this thursday so I'm in a hurry!!
ReplyDeleteThis is a great solution but it stopped working for me recently. Is there a fix available somewhere? Thanks in advance!
ReplyDeleteHi! thank you for your post, I tried to make it work, but for some reason, I doesn´t, I used another YT video, because the one referred in the demo doesn´t exist any longer, so, using another video, I can´t see any video, you can see there´s internet activity, I used my iPhone through with internet shared from my iMac, where I can monitor any activity, but in the iPhone no video is displayed, the message I got is that the video failed loading, any advice?
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteHi mini toro,
ReplyDeleteIs it working for Android?
The blog post says it does but the asset store says coming soon.
Thanks for clarifying!
-E
Yes, it is working for both iOS and android platform now.
DeleteThanks for you support :-)
Is it possible to download videos from youtube or keep it in a cache for offline viewing somehow?
ReplyDeleteAlso, I suppose it is using youtube API, but regardless, do you happen to know what kind of restrictions there might be with playing videos from one channel and thousands of clients?
DeleteI'm going to use videos heavily and I'm trying to balance out if it's worth it going with youtube or if we should just host videos for downloading. With the second we won't have good streaming, but at least if we fall into bandwidth issues we can deal with it and not simply get blocked by APIs.
Is it possible to stream a youtube video to a texture with this plugin?
ReplyDeleteNope. It opens native video player.
DeleteCan you please answer the above question of whether the plugin plays the video natively within the game without having to go through an external video player?
ReplyDeleteIt plays the video natively, and that's a different question. It's a player external to unity, but not external to the native video players on your mobile platform (either iOS or Android).
DeleteAny methods for retrieving title and description?
ReplyDeleteThe plugin iYoutube works perfectly on Android, but on iOS we always have the following error when trying to play a video (even with the latest version of the plugin) :
ReplyDelete[MPViewController initWithContentURL:]: unrecognized selector sent to instance 0x18114b60 ... any idea what it could be ?
Uncaught exception: NSInvalidArgumentException: -[MPViewController initWithContentURL:]: unrecognized selector sent to instance 0x18114b60
We have fixed it and upload a new binary to Unity Asset Store. We will try our best fix it as soon as possible and reflect to all of our users. :)
DeleteThis comment has been removed by a blog administrator.
ReplyDeletePlz does it have the functionality of getting an event like "video ended event"
ReplyDeleteafter the video has finished playing?
Thank you for your reply.
Plz does it have the functionality of getting an event like "video ended event"
ReplyDeleteafter the video has finished playing?
Thank you for your reply.
Does the plugin render the video on a texture in-game or just fullscreen?
ReplyDelete