android-youtube-api

ViewPager and YouTubePlayer

萝らか妹 提交于 2019-12-06 15:03:56
In my actvity I have a viewPager with for example 3 pages. In all of theses pages, I have a YouTubePlayer with a different id video. The problem is that all the YouTubePlayer component has the same video at the same time. Concretely : When the first page is displayed, the YouTubePlayer show the first video, so all seems to be ok. When I try to scroll to the 2nd page, I can see that the 2nd YouTubePlayer show the same video. When the 2nd page is completely displayed (After scrolling), behind the view pager prepare the 3rd page. So on the 3rd page the 3rd id video is set to the YouTubePlayer

Upload Video on youtube from android application

泪湿孤枕 提交于 2019-12-06 14:41:09
问题 I'm working on an application that uses youtube player to play youtube videos, for this purpose i'm using youtube android player api v3, Now i want to upload videos on youtube using my application, i've found a solution for that purpose, below is the link, https://developers.google.com/youtube/v3/code_samples/java#upload_a_video I downlaoded google-api-java-client library, but i can't find any jar file that contains these classes import com.google.api.services.samples.youtube.cmdline.Auth;

Youtube video played in WebView shows black screen when taken to fullscreen

元气小坏坏 提交于 2019-12-06 14:08:41
Short Version: To play YouTube video, I'm using a WebView like this, webView.loadData("<style> body{margin:0; background-color:black;}div{width:100%; height:100%; background-color:black}iframe{ width:100%; height:100%; border:none; overflow:hidden; }</style><div><iframe src=\"http://www.youtube-nocookie.com/embed/4eO9SS3wvLY?autoplay=1&rel=0&app=youtube_gdata&fs=1" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" webkitallowfullscreen=\"webkitallowfullscreen\"></iframe></div>", "text/html", "utf-8"); Everything works fine except when clicking on [ ] icon to take the video to full screen,

Android YouTube API - Handling Orientation Change with No Buffering

牧云@^-^@ 提交于 2019-12-06 11:24:56
I am using Android YouTube API to show a video in portrait mode. Upon playing the video and turning the device into landscape mode, the video continues from the spot left off but re-buffers. I am looking for a solution as to how avoid the re-buffering. I know for a fact its possible since Google provides an example here , and it works flawlessly except I can't seem to make it work with my application. I am unsure as to which functions to override and which ones actually remove the re-buffering. Edit: here's the full xml for the cell in the ListView; the YouTubePlayerView is added

ActionBar overlaying YouTubePlayerSupportFragment from YouTube Player API

狂风中的少年 提交于 2019-12-06 07:18:27
问题 I've got an activity extending AppCompatActivity , using a theme extending Theme.AppCompat.Light.DarkActionBar . This activity's view is a LinearLayout with a VERTICAL orientation containing the following views: A FrameLayout containing a YouTubePlayerSupportFragment . Note that I'm calling the following methods on the obtained YouTubePlayer on initialization success: setPlayerStyle(PlayerStyle.CHROMELESS) addFullscreenControlFlag(YouTubePlayer.FULLSCREEN_FLAG_CUSTOM_LAYOUT) I also set an

Youtube player crashes with giving java.lang.IllegalStateException: android.os.DeadObjectException in Android

爱⌒轻易说出口 提交于 2019-12-06 06:17:26
I am working on a project. I am using YouTubeAndroidPlayerAPI and Webview in my activity. when I try to run a video with its id, it runs. Problem is but if the video id is null, then I am not running or initializing the video as explained in the code, then It gives me the following logcat output and my application gets crash with giving the message as "Unfortunately You tube has stopped" . Can anyone help me as I had done lot of searches but couldn't find any solution. My Activity extends SherlockYouTubeActivity . The SherlockYouTubeActivity contains the SherlockActivity code but inspite of

How do I get video info for Youtube Vevo Videos?

て烟熏妆下的殇ゞ 提交于 2019-12-06 04:59:25
问题 I was trying to play YouTube Videos outside YT player, When I was trying to download info using "http://www.youtube.com/get_video_info?video_id=" for Vevo Channel videos it gives the following content! errordetail=0&reason=This+video+contains+content+from+VEVO.+It+is+restricted+from+playback+on+certain+sites.%3Cbr%2F%3E%3Cu%3E%3Ca+href%3D%27http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1G4isv_Fylg%26feature%3Dplayer_embedded%27+target%3D%27_blank%27%3EWatch+on+YouTube%3C%2Fa%3E%3C%2Fu%3E

Getting a lot of crashes from android youtube player api

微笑、不失礼 提交于 2019-12-06 02:26:30
I am using version 1.2.1 (tried with latest version 1.2.2) of android's youtube player api . It works fine on most of the devices. However now and then, I keep on getting crashes on crashlytics. I am getting the following crashes Fatal Exception: java.lang.IllegalStateException: android.os.TransactionTooLargeException at com.google.android.youtube.api.jar.client.RemoteEmbeddedPlayer.x(SourceFile:558) at bpd.w(SourceFile:576) at tef.onTransact(SourceFile:390) at android.os.Binder.transact(Binder.java:395) at com.google.android.youtube.player.internal.d$a$a.r(Unknown Source) at com.google

Android Youtube Player in Fragment and Activity causes black screen

試著忘記壹切 提交于 2019-12-06 01:19:36
I need to load a video in youtube player in an fragment (Consider it as Fragment A) as a header to a gridview in a fragment.Video is loading fine without any issue. But if i click on a grid item and loads seperate activity (Consider it as Activity B) in which there also, I am having youtube video player. It is playing fine in that activity. But when i come back to fragment from the activity B , now youtube player is not playing. Simply black screen is displaying. FYI, I am having Fragment A in slidingMenu activity and activity B as activity. For Fragment i am using youtubesupportfragment and

How to search videos with youtube data API in Android

穿精又带淫゛_ 提交于 2019-12-05 20:47:15
问题 I'm developing an application in Android which needs to search for videos of YouTube by Keyword. I have used Youtube data API with the code below: try { youtube = new YouTube.Builder(Auth.HTTP_TRANSPORT, Auth.JSON_FACTORY, new HttpRequestInitializer() { public void initialize(HttpRequest request) throws IOException { } }).setApplicationName("YoutubeQoE").build(); // Define the API request for retrieving search results. YouTube.Search.List search = youtube.search().list("id,snippet"); // Set