Get current stream URL out of Youtube Live API
-
Is there any way currently to get the livestream URL out of the Youtube Live API? I can get the id, but there doesn't appear to be anyway to change that into a URL. Not that it should matter, but I'm using the Python youtube client.
-
Answer:
[Edited] I believe you got the stream ID instead of the broadcast ID. Check the https://developers.google.com/youtube/v3/live/code_samples/python#retrieve_a_channel_s_live_video_streams to see how to get your channel's broadcast ID. ... print "%s (%s)" % (broadcast["snippet"]["title"], broadcast["id"]) vs ... print "%s (%s)" % (stream["snippet"]["title"], stream["id"]) Although both get an id value, they are two different objects, therefore they should give you two different IDs. Appending the broadcast ID to the URL I mentioned in the comments will give you the URL for the stream. Update: If you created a live event via your YouTube channel, you can just use liveBroadcasts list to get the id, which will also be the video ID that you can use to get the URL. If you created a liveStream via insert(), you must also create a liveBroadcast using insert() and bind it to the liveStream with bind() before you can use liveBroadcasts list to get the ID.
Ben Hoff at Stack Overflow Visit the source
Related Q & A:
- How to Get Current Browser URL in Code Behind?Best solution by stackoverflow.com
- how to get a hangout url from the hangout button?Best solution by Stack Overflow
- How to get the previous URL after using window.history.back?Best solution by stackoverflow.com
- How to get current YouTube video url using JavaScript?Best solution by Stack Overflow
- How do you get a Myspace URL?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.