Android app displaying list of video from YouTube playlist using YouTube API - api

I want to make an app which shows video from my YouTube channel or from my playlist using using YouTube API..
the app should be like this..
app should display list of all video in playlist and when user click on any video it should be played...
how can i do this app ?
if you know solution please send both java and xml code for this.. or send a link from where i can download source code

Checkout PlaylistItems, it returns all the videos from your playlist.
"A playlistItem resource identifies another resource, such as a video,
that is included in a playlist. In addition, the playlistItem resource
contains details about the included resource that pertain specifically
to how that resource is used in that playlist."
For Java code samples, checkout the Official Youtube api-samples/java for code reference.

Related

How do I get the video category associated with a youtube video from the video url?

I'm wokring on a personal project where I need to get the video category associated with a youtube video from the video url but I can't seem to find a solution. The Youtube API gives me a list of video categories but not assocaited with any specific video.
My code is basically scratched.

YouTube Data API video insert/update - setting 'Game title'

The YouTube Data API v3 functions Video.insert and Video.update do not contain an option to set the "Game title" as you can when uploading / updating a video in the web UI:
This is only available if the category is set to Gaming.
Edit: To clarify, I do not wish to set the Video Title. This input is used to identify the Game that is being played in the uploaded video and is displayed under the video description.
Is there an API endpoint to set this Game title? Or do I have to POST to https://www.youtube.com/metadata_ajax?action_edit_video=1 like the web UI does?
The Youtube Data API does not have this implemented at this time of writing. And nether we are able to Get the game title as well.

Playing youtube/vevo videos on iOS

I've seen the Google blog article explaining the way to embed youtube videos in an iOS app. I've successfully embed videos in my iOS app. BUT, I've seen the WhoSampled app where they are able to play Vevo/youtube videos. Somehow they are able to play those videos and my app is not able to play them. (In my app, there is a blue play circle with a line through it showing that is not playable.)
How do I allow those videos to be playable?
Do I have to setup the youtube link in a specific way or is there a way I need to setup the developer key?
There is a way to get the actual video stream for a given YouTube video instead of the HTML-embedded one. See this project:
https://github.com/hellozimi/HCYoutubeParser
The problem with this approach is that it will likely violate the EULA of YouTube APIs, especially if you are releasing it in a paid application:
In addition, please remember that attempting to play a YouTube video outside of either the YouTube embedded, custom or chromeless player is strictly prohibited by the API Terms of Service.
(source: https://developers.google.com/youtube/creating_monetizable_applications)
You just have to use the iframe embed as opposed to the Flash one.

Play brightcove videos

I want to play a remote video hosted in Brightcove. As Brightcove URLs are links to players not direct links to video files the AVPlayer won't do it.
I know Brightcove provides an API but can't find any good examples for iOS nor documentation.
Any help/pointing direction appreciated.
I haven't used Brightcove, but poking around their site, I see they have two APIs: a Player API and a Media API. It sounds like the Media API is what you want — it's documented as giving direct references to the videos. The page has a link to several examples.
You can also lift alot of the code from their Oneplanet demo source. In fact the whole playlist and video player mechanism can be practically copied into your project so all you need to do is pass a video or playlist ID into their initwithnibandplaylist function in their view controller and you're good to go.
I hope this helps your question. There is a renditions which contain direct video link.
Here is a link for api link.
http://support.brightcove.com/en/video-cloud/docs/accessing-video-content-media-api
renditions is a javascript object containing multiple video links based on resolutions such as 360,460, 720.
You can find the direct link to the video via the media api, bypassing the player API entirely. You need a pro account and a token:
http://support.brightcove.com/en/docs/getting-started-media-api
Alternatively, you can create a simple "player" without any controls (just a video window actually) and make your own HTML controls totally outside of Brightcove to trigger almost anything you'd want to do via the player API.
There is also a Brightcove iOS SDK. It is really two SDKs one for the Media API and one that includes a MediaPlayer. If you want to use the AVPlayer you can use the Media API iOS SDK. Here is the docs for that:
http://docs.brightcove.com/en/video-cloud/mobile-sdks/brightcove-player-sdk-for-ios

How can I post a video, via Facebook's Connect API, to my Facebook profile page?

Has anyone posted a video via the Facebook Connect API to their profile / feed page?
Ideally, the video should be queued to the first frame with the superimposed Facebook's blue right arrow "play" button. Or if a thumbnail representing the video has to also be uploaded (rather than the video being queued to the first frame) as well, this is fine.
Also, when the video, or thumbnail, on the profile page is clicked, the video plays where it is - rather than going to another page off Facebook to be played there.
The question may have not been correctly worded. The term "API" was misleading to a couple of folks - and I apologize for that.
What I was trying to do was to "share" a video by linking it in Facebook, AND to have it play in the profile feed (ie. to not leave the Facebook site while viewing the video - just like YouTube and Hulu.com do).
After digging into the JavaScript that Hulu was using to get this behavior, we noticed that a link tag was missing between our version of the <meta> and <link> tags, and Hulu's.
Facebook's web page, http://www.facebook.com/share_partners.php, was missing a tag that you should have if the content is a video, and you want it played in the profile feed.
Along with:
<link rel="video_src" href="http://www.example.com/player.swf?video_id=123456789"/> ...
You should include:
<link rel="media:video" href="http://www.example.com/player.swf?video_id=123456789"/>
That will get it to play in the feed. BUT, your domain name must be whitelisted.
To get your domain whitelisted, fill out this form: http://www.facebook.com/share_partners.php#/developers/developer_help.php
I got a reply, and approval, within a day! Kudos to the Facebook developer support staff!
Use the Video.upload as described by stevedbrown or the Stream API or if you want to go simple share the link via API or share link.
Have you read the Facebook developer wiki page on this? That explains what is possible and how, it's pretty decent.