youtube

Grabbing color palette from YouTube thumbnail

别等时光非礼了梦想. 提交于 2020-01-14 14:25:14
问题 I'm trying to grab the color palette from YouTube thumbnails, to better blend the YouTube video with a whole website design, and I'm wondering if there is any way of doing this? I've tried using color-thief (https://github.com/lokesh/color-thief) and this code (with no luck): var img = new Image(); img.onload = function () { var colorThief = new ColorThief(); colorThief.getColor(img); }; img.crossOrigin = 'Anonymous'; img.src = 'http://img.youtube.com/vi/NuEfvIca0XU/mqdefault.jpg From this I

Youtube Player video not loading

て烟熏妆下的殇ゞ 提交于 2020-01-14 12:49:08
问题 I have a activity called VideoActivity .Below the youtubeplayerview there is a list of videos.On the first time the video is loading.When i click on a item then go to another activity and then return to that activity, it does not play. May i know the reason ? Here is the code public class VideoActivity extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener { public Video video; private RecyclerView recyclerVideos; private static final int RECOVERY_DIALOG_REQUEST = 1;

White screen after closing fullscreen video opened from WebView

主宰稳场 提交于 2020-01-14 10:28:09
问题 I have a WebView with embedded youtube video. I've implemented fullscreen mode using simple dialog solution like this: webView.setWebChromeClient(new CustomWebChromeClient()); public class CustomWebChromeClient extends WebChromeClient { @Override public void onShowCustomView(View view, CustomViewCallback callback) { Dialog dialog = new Dialog(ArticleDetailsActivity.this, android.R.style.Theme_Black_NoTitleBar_Fullscreen); view.setBackgroundColor(getResources().getColor(R.color.black)); dialog

youtube-mp3.org api not working properly, only downloads cached videos

无人久伴 提交于 2020-01-14 06:40:08
问题 Previously i was able to download YouTube videos as mp3 via youtube-mp3.org Using this method: http://www.youtube-mp3.org/api/pushItem/?item=http%3A//www.youtube.com/watch%3Fv%3D<VIDEOID>&xy=_ Then it returned the video id and they started converting the video on their servers. Then this request would return a JSON string with info about the video and the current conversion status: http://www.youtube-mp3.org/api/itemInfo/?video_id=<VIDEOID>&adloc= After repeating the request until the value

How to play multiple videos in YouTube Player API?

别来无恙 提交于 2020-01-14 06:35:20
问题 I am trying to play a number of videos from YouTube using the YouTube Player API in Android Studio. I have the Video Id of each videos in different strings with name of video titles. Now I want the player to play video when each button with video title is clicked. @Override public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored) { if (!wasRestored) { player.cueVideo("my_video_id_1"); } } Using this method, I don't know how to ' change

Youtube API key - accessNotConfigured error

落爺英雄遲暮 提交于 2020-01-14 04:56:05
问题 I registered my application with YouTube for an Android app, and got an API key. And then I tried to make an api call through my browser to try it like this: https://www.googleapis.com/youtube/v3/channels?part=contentDetails&mine=true&key=my_api_key and I got this error: { "error": { "errors": [ { "domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configured" } ], "code": 403, "message": "Access Not Configured" } } But I did configure my account and set the

Force download mp4 files

限于喜欢 提交于 2020-01-14 02:45:40
问题 I want to force the user tho download a youtube video. For example this url. I download the video and I can play the original video, but even the length/size of video is the same I cant play it when is force_downloaded. function force_download($file,$video_url) { $video_data = file_get_contents($video_url); file_put_contents($file, $video_data); if(isset($file) && file_exists($file)) { header('Content-length: ' . filesize($file)); header('Content-type: application/octet-stream'); header(

Fetch the exact time a video was uploaded

眉间皱痕 提交于 2020-01-14 01:58:31
问题 I'm using the Youtube API to search using a keyword query: import gdata.youtube import gdata.youtube.service def youtube_query(query_text, max_results=50, start_index=1, racy='exclude', orderby='relevance'): client = gdata.youtube.service.YouTubeService() query = gdata.youtube.service.YouTubeVideoQuery() query.vq = query_text query.max_results = max_results query.start_index = start_index query.racy = racy #query.format = 5 query.orderby = orderby feed = client.YouTubeQuery(query)

Does the Youtube API return list of users that have watched my video?

六眼飞鱼酱① 提交于 2020-01-13 19:54:07
问题 I'd like to create a Youtube app that rewards users after they have watched a certain number of my Youtube-channel's videos - or that rewards "experience points" based on the amount of time spent watching my channel. Can I query the Youtube API to see if an authenticated user has watched a specific video associated with the app? Seems like I can query against "likes" and "dislikes" - but curious if anyone has tracked "watch-time" or just "watched" in general. My hesitation here is that I don

Does the Youtube API return list of users that have watched my video?

风格不统一 提交于 2020-01-13 19:54:06
问题 I'd like to create a Youtube app that rewards users after they have watched a certain number of my Youtube-channel's videos - or that rewards "experience points" based on the amount of time spent watching my channel. Can I query the Youtube API to see if an authenticated user has watched a specific video associated with the app? Seems like I can query against "likes" and "dislikes" - but curious if anyone has tracked "watch-time" or just "watched" in general. My hesitation here is that I don