Search code examples
androidyoutubemedia-playeryoutube-api

how to integrate youtube android player


I want to integrate video player for you tube specially. I found youtube android player tools but i did not find implementation.

And I have implemented android-youtube-player. but it is not working.

If anyone has integrated then need help.


Solution

  • The YouTube Andoid Player presentation was made at Google I/O 2012 and the Android Player API is not yet publicly available (As of 21st Nov 2012). That presentation is the only public information I'm aware of.

    (Update: It's now been publicly announced, and released as an experimental API: http://apiblog.youtube.com/2012/12/no-webview-required-with-native-youtube.html )

    The android-youtube-player library is unofficial. I suggest you read the YouTube API Terms of Service:

    https://developers.google.com/youtube/terms

    In particular, you may not use any player other than the official YouTube players.

    I have heard reports of the iframe API working by embedding it in an embedded web view - but I can't verify those reports personally, or how to deal with issues such as cross domain messaging and cross-language bindings between java and the dom javascript bindings.

    The easiest way to load a YouTube video from an android app is to call for the OS to load the YouTube video using intents.

    Given there is an Android library in development at YouTube (from your link), I would suggest using the quickest and easiest method available for now, and potentially using that API in a later update.

    There's more discussion on calling to start the video in the YouTube app here: Android YouTube app Play Video Intent