How to use the Google+ Hangouts API to get the Hangout On Air YouTube Live Video Embed URL? - youtube-javascript-api

I created an google+ hangout app.
now i want to get a youtube LIVE video embeded url to display.
i tried below Js in my browser console after starting broadcast
gapi.hangout.onair.getYouTubeLiveId(); <br/>
but i am getting 'null' as the result.
i tried gapi.hangout.onair.isBroadcasting();
but i am getting 'false' as the output in chrome browser console.
i tried gapi.hangout.onair.isOnAirHangout();
but it got 'false' as the output.
can anyone tell me the reason?

According to API documentation, getYouTubeLiveId() returns the YouTube Live ID for the Hangout On Air. Returns null if the ID is not available or the Hangout is not a broadcast hangout. Also, off-hand, I'm not sure it will provide the ID to a non-HOST. It's worth it to try as both Host of HoA and Participant and see if there's a difference.
I'm happy to test with you if you like.

Related

Use multiple Camera on Instagram Live

I use my Android Phone and I want to use multiple camera on Instagram live video and switch between. I have 2 question:
How I can do this?
Can I use windows to send live stream as Instagram live?
Please help me, thank you

Android app displaying list of video from YouTube playlist using YouTube 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.

Is there any way to know if a youtube video display ads? via API?

Some youtube videos has those ads show up on video at the bottom of the screen. Is there any which I can find out which videos have these kind of ads?
You can use the listener services which have methods such as onAdStarted().
Full dev doc: https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer.PlayerStateChangeListener

Is there anyway to have hangouts outside google+?

Is there any way by which we can have a hangout session within our webapp, say in an iframe ?
I was about to experiment with hangout api, but going by existing apps on hangout, it seems they can only be viewed and used from within Google+.
Is there a work around where I can make the user feel that hangout is a part of my app rather than my app being part of the hangout ?
There's no way to embed a hangout into your web application, but you can use the hangout button to launch a hangout app. This allows you to integrate features and data from your web application into a hangout.
The hangout button is made up of an image and a hangout launching link. It comes in a few sizes. Here's the code for the smallest size (75x19 px)
<a href="https://plus.google.com/hangouts/_?gid=APP_ID" style="text-decoration:none;">
<img src="https://ssl.gstatic.com/s2/oz/images/stars/hangout/1/gplus-hangout-15x79-normal.png"
alt="Start a Hangout"
style="border:0;width:79px;height:15px;"/>
</a>
In this snippet you must substitute APP_ID with your application's ID from the API console. When you are viewing your project you'll find the application ID at the end of the URL.
Currently, there's no way of embedding a Hangout app in your web application. But, there's an opened issue tracker where you can add your comments about the need of this feature and Google might release it in their future API releases.

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.