android-youtube-api

android.os.DeadObjectException at com.google.android.youtube.api.jar.client.RemoteEmbeddedPlayer.x

无人久伴 提交于 2019-12-13 13:08:04
问题 I am facing this problem I don't have any scenario it reported as 20 times: I have the youtube jar as the version number is: Manifest-Version : 1.0 Name : com/google/android/youtube/player Specification-Title : YouTube Android Player API Specification-Version : 1.2.2 Specification-Vendor : Google Inc Created-By : 1.8.0-google-v7 (Google Inc.) Fatal Exception: java.lang.IllegalStateException: android.os.DeadObjectException at com.google.android.youtube.api.jar.client.RemoteEmbeddedPlayer.x

YouTubePlayer(View) keeps pausing in landscape

只谈情不闲聊 提交于 2019-12-13 04:53:30
问题 I'm building a app that contains a YouTubePlayerView and YouTubePlayer, it works well in Portrait, Fullscreen-landscape but not landscape. It keeps pausing every second after I press play. The buffer shows it is fully loaded on some videos, yet it keeps pausing. I tested it on Android 2.2.2 and Android 4.1.2 with the latest version of the YouTube app. This happens in all player styles. Thanks in advance. 回答1: Make sure the size of the YoutubePlayer view is atleast 200x110 dp like descriped in

YouTubePlayerFragment black screen on orientation changes

放肆的年华 提交于 2019-12-12 18:45:58
问题 I'm trying to keep playing YouTubePlayerFragment on orientation changes. the code looks like this: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) { FrameLayout frameLayout = new FrameLayout(getActivity()); populateViewForOrientation(inflater, frameLayout); return frameLayout; } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); LayoutInflater inflater = LayoutInflater.from

Detecting when a YouTube video has finished playing

假装没事ソ 提交于 2019-12-12 10:47:03
问题 How to do I check when a YouTube video has finished playing in the official YouTube Android app? In the LogCat I see things such as: VideoStage: MEDIA_PLAYING_VIDEO. Is there any way to detect when this finishes? 回答1: You could use MediaPlayer. It has an isPlaying method to check if music/videos are currently playing. Just set a Boolean to true while it's playing and check the isPlaying method against that Boolean to see if it changed from True to False . Otherwise Youtube (or google) may

Android YouTube API “An error occurred while initializing YouTube player”

回眸只為那壹抹淺笑 提交于 2019-12-12 10:39:34
问题 I have an android app, which allows to play youtube video. I am using the latest YouTube API (1.2.1). I try it on a several devices within android version 4.0.4, 4.3, 4.4.4 or 5.0 and it works perfect (on every device is YouTube app version 10.-. But on one device, where is android 4.0.4 and YouTube app version 4.4.11 it does not work and get an error "An error occurred while initializing YouTube player". In documentation is written, that the minimal required version of YouTube app is 4.2.16.

Android YouTube API - Handling Orientation Change with No Buffering

有些话、适合烂在心里 提交于 2019-12-12 10:10:02
问题 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

Full-screen goes out when switching to portrait

蓝咒 提交于 2019-12-12 04:43:14
问题 I am using Youtube API for android app and I'm looking for a way to avoid exiting full-screen mode while switching between landscape modes. Meaning, I don't want to exit full-screen mode while switching the phone to portrait mode. I need the video to always be on full-screen. Is there a way to make it happen? My current code for full screen is: @Override public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored) { if (!wasRestored) { Intent

YouTube Video Starts to Buffer again on full screen in Android

非 Y 不嫁゛ 提交于 2019-12-12 04:21:29
问题 I have integrated YouTube Video in my Android app. Now the problem is when video is turned into full screen (landscape) mode, it starts to buffer again. How to solve this problem? Below is the whole code I have used. public class MainActivity extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener { private static final int RECOVERY_DIALOG_REQUEST = 1; // YouTube player view private YouTubePlayerView youTubeView; @Override protected void onCreate(Bundle savedInstanceState)

Google Oauth 2.0 authentication for limited input device not working except on curl

主宰稳场 提交于 2019-12-12 04:12:47
问题 I am trying to use a custom java application of mine to upload videos to my youtube account via an access limited device like a Raspberry pi running as a server. For this I am using the Google Oauth 2.0 for limited input device as a reference. I followed the steps mentioned with my custom java application, Fiddler and curl, the surprise is as follows: All of the calls worked right as mentioned by Google Oauth 2.0 for limited input device for curl. But issues were observed with Fiddler and my

Is it possible to place the overlay view in youtube player view in android?

孤人 提交于 2019-12-11 16:50:02
问题 In my case,set the textview in above of the youtube player view.I am getting the error like unauthorized overlay.Is it possible to overlay the view in youtube player view? below is my code <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:id="@+id/txt_attach" android:layout_width="120dp" android:layout_height="35dp" android:gravity="center" android:textSize="15dp" android:textColor="#ffffff" android:layout