youtube-data-api

gapi.client.youtube is undefined?

瘦欲@ 提交于 2019-11-26 21:29:23
问题 I am trying to use youtube api for javascript and am getting 'gapi.client.youtube is undefined'. I have gone through the link: Why is 'gapi.client.youtube' from Youtube Data Api V3 undefined? , but couldn't get much help. My code is placed below: <script> function load(){ gapi.client.setApiKey('AIzaSyARvwirFktEIi_BTaKcCi9Ja-m3IEJYIRk'); gapi.client.load('youtube', 'v3'); searchA(); //alert(gapi.client.youtube.channels); } function searchA() { var q = 'pink floyd'; var request = gapi.client

Youtube api v3 Get list of user's videos

心不动则不痛 提交于 2019-11-26 17:55:35
问题 With Youtube api v2, there's easy way to get videos. Just send a query like this: http://gdata.youtube.com/feeds/mobile/videos?max-results=5&alt=rss&orderby=published&author=OneDirectionVEVO The Youtube api v2 also has an interactive demo page for building query: http://gdata.youtube.com/demo/index.html With Youtube api v3, I don't know the corresponding way. Please point me the way with api v3. Thank you! 回答1: The channels#list method will return a JSON with some information about the

How to check if YouTube channel is streaming live

回眸只為那壹抹淺笑 提交于 2019-11-26 17:48:29
I can't find any informations to check if a YouTube channel is actually streaming or not. With Twitch you just need the channel name, and with the API you can check if there is a live or not. I don't want to use OAuth, normally a public API key is enough. Like checking the videos of a channel I want to know if the channel is streaming. You can do this by using search.list and specifying the channel ID, setting the type to video , and setting eventType to live . For example, when I searched for: https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCXswCcAMb5bvEUIDEzXFGYg&type

Youtube Video title with API v3 without API key?

情到浓时终转凉″ 提交于 2019-11-26 16:26:23
问题 Is it possible to get the video title using the video ID with API v3 without the API key? I could not find any information or example of getting the title in the API documentation. 回答1: To get the video title, you will need an API key, and you'll need to make a request to: https://www.googleapis.com/youtube/v3/videos?part=snippet&id={COMMA_DELIMITED_LIST_OF_IDS}&key={YOUR_API_KEY} In the returned packet, the title will be at items.snippet.title You can't retrieve any API data without an API

How to get the mp4 url for Youtube videos using Youtube v3 API

杀马特。学长 韩版系。学妹 提交于 2019-11-26 15:28:43
问题 How do I get the full mp4 url to play the video from it's actual location in my application using some other source except Youtube. The gdata/youtube API has been deprecated so I am having trouble. Any help will be appreciated. Thanks. 回答1: i made a very simple API : https://gist.github.com/el3zahaby/9e60f1ae3168c38cc0f0054c15cd6a83 As Example: YouTube Video Link: https://www.youtube.com/watch?v= YGCLs9Bt_KY now to get the Direct link you need to call the api , like this : https://script-url

How do I get video durations with YouTube API version 3?

空扰寡人 提交于 2019-11-26 15:05:07
I'm using YouTube API v3 to search YouTube. https://developers.google.com/youtube/v3/docs/search As you can see, the response JSON doesn't contains video durations. Is there way to get video durations? Preferably not calling an API for each element in the result again (unless that's the only way to get durations). Matt Koskela You will have to make a call to the YouTube data API's video resource after you make the search call. You can put up to 50 video IDs in a search, so you won't have to call it for each element. https://developers.google.com/youtube/v3/docs/videos/list You'll want to set

How can I get the actual video URL of a YouTube live stream?

 ̄綄美尐妖づ 提交于 2019-11-26 10:19:16
问题 Is there a way to get the HLS URL for YouTube live streams like this one https://www.youtube.com/embed/WVZpCdHq3Qg I\'ve tried the typical get_video_info methods but they don\'t seem to work with live streams. 回答1: You need to get the HLS m3u8 playlist files from the video's manifest. There are ways to do this by hand, but for simplicity I'll be using the youtube-dl tool to get this information. I'll be using this live stream as an example: https://www.youtube.com/watch?v=_Gtc-GtLlTk First,

How do I get video durations with YouTube API version 3?

强颜欢笑 提交于 2019-11-26 04:10:06
问题 I\'m using YouTube API v3 to search YouTube. https://developers.google.com/youtube/v3/docs/search As you can see, the response JSON doesn\'t contains video durations. Is there way to get video durations? Preferably not calling an API for each element in the result again (unless that\'s the only way to get durations). 回答1: You will have to make a call to the YouTube data API's video resource after you make the search call. You can put up to 50 video IDs in a search, so you won't have to call

How do I get a YouTube video thumbnail from the YouTube API?

让人想犯罪 __ 提交于 2019-11-25 21:45:52
问题 If I have a YouTube video URL, is there any way to use PHP and cURL to get the associated thumbnail from the YouTube API? 回答1: Each YouTube video has four generated images. They are predictably formatted as follows: https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg https://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg The first one in the list