android-youtube-api

Is there a way to get the “Watch Later” playlist using YouTube API v3?

混江龙づ霸主 提交于 2019-11-30 12:53:06
I was wondering if this is available in v3 (I know it's possible with v2)? I've tried using watch_later as the id and mine=true in a playlist request. The watch_later playlist is not returned in the generic playlists list results when specifying mine=true . Update As of Sep 12 2016 , watch later and watch history can no longer be retrieved YouTube Data API v3. Original answer (no longer works) You can get the IDs of you special private playlists with an authenticated request to GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&mine=true&key={YOUR_API_KEY} One of these is

YouTube Android Player API throws “BadParcelableException ClassNotFoundException when unmarshalling: asc” with new YouTube version

自闭症网瘾萝莉.ら 提交于 2019-11-30 09:45:07
Filing bug to YouTube Android Player API Library engineers: see android-youtube-api tag Over the course of the past week and a half, I've noticed this weird BadParcelableException steadily increasing in our app and have nailed it down to YouTube's new release on android. This crash will occur if your app is playing a youtube video, bringing your app to background, force stopping the Youtube app, and resuming your app again. Crash reproducible on Youtube version 12.19.56. Also tested on an older YouTube version 12.05.21 and the crash was not there. Stack trace: main Exception: Unable to start

Using Android Youtube API to play Live streams

懵懂的女人 提交于 2019-11-30 02:10:49
I am developing an Android app that uses the Android Youtube API. I can successfully play any video from Youtube. However, when I try to play a live stream, I encounter some issues: When the latest version of Youtube is installed on my device (Youtube 11.13.56), I get the following message : "There was a problem while playing, Tap to retry" After removing youtube updates and going back to "youtube 10.18.55" version, everything works fine. Any idea to handle this problem ? Thanks for your help Environment: Samsung Galaxy S4, Android 5.0.1, YouTubeAndroidPlayerApi-1.2.2 It seems like YouTube

Having trouble importing “google.api.services.samples.youtube.cmdline.Auth;”?

做~自己de王妃 提交于 2019-11-30 00:31:01
问题 I followed this tutorial https://developers.google.com/youtube/v3/code_samples/java#search_by_keyword to retreive youtube videos based on keyword using YouTubeData API This section is giving me the error: "Error:(117, 43) error: cannot find symbol variable auth" youtube = new YouTube.Builder(Auth.HTTP_TRANSPORT, Auth.JSON_FACTORY, new HttpRequestInitializer() { public void initialize(com.google.api.client.http.HttpRequest request) throws IOException { } }) .setApplicationName("youtube-cmdline

retrive only mobile-supported video from YouTube API

﹥>﹥吖頭↗ 提交于 2019-11-29 17:00:11
I'm using the YouTube API to retrieve videos for and Android client. The program works well but sometimes I get an error like "this video is not allowed to run on smartphones". So, there is a way to filter that videos? I read this doc but did not find a solution. There are two concepts embeddable and syndicated. iOS devices use iframe so they basically embed. Android devices that use player API can check syndicated. When you do a search->list , you can set videoEmbeddable and videoSyndicated to true. For Android, you should check videoSyndicated . Or if you are iterating through videos, for

how to set to play only HD Videos in YouTube Android Player API

狂风中的少年 提交于 2019-11-29 12:23:00
How to make YouTube Android Player API play only HD Videos Link @Override public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored) { if (!wasRestored) { Log.v("Mobile Url", "" + mobile_url); player.loadVideo(mobile_url); player.setFullscreen(true); player.setShowFullscreenButton(false); player.loadVideo("N1nFoVI3xJM"); } } Here I can set the loadVideo , setFullscreen , setShowFullscreenButton I need to load only HD Videos . Is that possible? Is any method available to set play only HD videos? If no HD Video found for that ID then I need to

Android : youtube player has been released

[亡魂溺海] 提交于 2019-11-29 01:50:22
I'm getting this error Fatal Exception: java.lang.IllegalStateException This YouTubePlayer has been released , but release() wasn't called explicitly.Here is the piece of code where crash occurs : if(youtubePlayer != null){ time = youtubePlayer.getCurrentTimeMillis();//exception may occur } is it possible to check that youtubePlayer was released ? Any callback ? Thanks. Most of the code in the Youtube SDK is obfuscated which makes it really hard to debug. And the fact that there isn't any direct method to check if the YoutubePlayer has been released or not doesn't help either. Having said that

Using Android Youtube API to play Live streams

笑着哭i 提交于 2019-11-28 23:45:15
问题 I am developing an Android app that uses the Android Youtube API. I can successfully play any video from Youtube. However, when I try to play a live stream, I encounter some issues: When the latest version of Youtube is installed on my device (Youtube 11.13.56), I get the following message : "There was a problem while playing, Tap to retry" After removing youtube updates and going back to "youtube 10.18.55" version, everything works fine. Any idea to handle this problem ? Thanks for your help

Unable to play some Youtube videos using YouTube Android Player API

主宰稳场 提交于 2019-11-28 23:17:55
For example this video can't be played with Youtube player API : https://www.youtube.com/watch?v=OLK1efdt3n8 (other videos from search response works ok) I get the following messages : 09-25 17:18:50.226 24280-24280/com.mypackagename W/YouTubeAndroidPlayerAPI﹕ Cannot load modern controls UI. Upgrade to the latest version of the Android YouTube API. 09-25 17:19:05.911 24280-24280/com.mypackagename E/YoutubePlayerFragment﹕ video error : INTERNAL_ERROR YouTubePlayer API version : 1.2.1 (latest) YouTube app on device is up to date and able to play this video Video parameters : videoEmbeddable=true

Multiple YouTubePlayerFragments inside a Horizontal ScrollView - all the players display the last loaded video

≡放荡痞女 提交于 2019-11-28 12:42:30
I want to show multiple YouTube videos in a Horizontal ScrollView . For that, I'm adding YouTubePlayerFragments dynamically. Here's the piece of my code: //set videos int count = 0; FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); for (final Video video : mVideos) { //create an instance of a video fragment final VideoFragment fragment = new VideoFragment();// VideoFragment extends YouTubePlayerFragment Bundle bundle = new Bundle(); if (null != mVideos && 0 < mVideos.size()) { bundle.putString(VideoFragment.KEY_VIDEO_KEY, video.getKey()); } fragment.setArguments