Sunday 7 July 2013

iYoutube Unity iOS Plugin


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!!!


===================
====== Donation =====
===================
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


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)


=======================
== 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);