android-youtube-api

ActionBar overlaying YouTubePlayerSupportFragment from YouTube Player API

若如初见. 提交于 2019-12-04 15:26:12
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 onClickListener on the player view, supposed to hide and show the ActionBar on demand. Another view

Embed Youtube video inside an Android app

感情迁移 提交于 2019-12-04 07:27:31
问题 I'm using a WebView for displaying embedded Youtube video and that works on Galaxcy S2 (OS 2.3.5) and doesn't on Nexus S (OS 2.3.4), all I get is white screen without any video display. Here is the code snippet I'm using and the declarations in Manifest file: private WebView wv; private void setWebView() { wv = (WebView) findViewById(R.id.webView); wv.setWebChromeClient(new WebChromeClient()); wv.getSettings().setPluginState(WebSettings.PluginState.ON); wv.setWebViewClient(new WebViewClient()

Activity has leaked ServiceConnection com.google.android.youtube.player that was originally bound here

喜你入骨 提交于 2019-12-04 05:27:47
问题 I'm using an Activity that has a layout with android.support.v4.view.ViewPager that I used to manipulate Tab navigation. I have different Fragments for different Tabs. On my third Tab, I'm loading some YouTube thumbnails from my YouTube account. When I load the application (when I'm staying at the first Tab) and press Back to exit from the application, it exists without any issue. But when I navigate to second Tab and try to press Back button, app exists with an error as follow. E

YoutubePlayer - Navigation Bar Overlay

别来无恙 提交于 2019-12-04 02:01:28
问题 I am using YoutubePlayerSupportFragment in my application. I am adding YouTubePlayer.FULLSCREEN_FLAG_CUSTOM_LAYOUT flag. From the documentation I know my player won't rebuffer after exiting from full screen, but now I have to handle Action Bar and Navigation Bar. But the documentation doesn't say or point to how I can handle these cases. Now the problem I am facing is so far only occurring in Asus Nexus 7 OS 5.1.1. I also have an LG G2 D802 OS 4.4.2, Samsung Galaxy TAB GT P5113 OS 4.4.2 and

Youtube API search livestream stop to work

别来无恙 提交于 2019-12-03 21:58:44
A few days that the youtube api stop to show a livestream videos, is this error only on my api key? if does, is there any other way to find a livestream videos? I googled if there any message from youtube about this, and i didn't find. https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC4R8DWoMoI7CAwX8_LjQHig&eventType=live&type=video&key= {MY_API_KEY} You are not alone. It's broken for everybody, unfortunately, and it's been this way for over ten days now. As with all Google services, human support and feedback is non-existent, not even an acknowledgement of the issue. Ref.:

Black patch youtube android api

爱⌒轻易说出口 提交于 2019-12-03 21:52:37
I have implemented youtube player api for android, when I put youtube player inside the scrollview and start the video, the moment I pause the video and scroll the screen up and down it has black patch with it. I could not get why the black patch is coming over?I tried to capture the screen but the screenshot does not have the black patch. Below is my code : <com.google.android.youtube.player.YouTubePlayerView android:id="@+id/youtube_view" android:layout_width="wrap_content" android:layout_height="wrap_content" /> the black patch appears because the video view uses a SurfaceView. The real

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

牧云@^-^@ 提交于 2019-12-03 20:34:55
I have a Fragment containing a YouTubePlayerSupportFragment . This fragment is inside a ViewPager. The player works fine on my Galaxy S3 Android phone (4.3 / API 18) and on my VM (4.3 / API 18). But on every other phones i've tried, the player shows a An error occurred while initializing YouTube player message and throw a onInitializationFailure with an UNKNOWN_ERROR reason. I've checked the LogCat and there is absolutly no other error/warning, from my app or from youtube. It didnt work on the following devices: Android 4.2.1 - Youtube 10.18.55 Android 4.4.2 - Youtube 10.18.55 Android 5.1 -

ViewPagerAdapter: YouTube video playback stopped due to unauthorized overlay on top of player

Deadly 提交于 2019-12-03 17:14:59
Asking this question because I did not find solution/suggestions after searching for hours. All answered solutions are with Fragment. What I am looking for ViewPagerAdapter and FrameLayout. My ViewPagerAdapter xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/promotion_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <ImageView android:id="@+id

YouTube player for android crashes on ads playback

≯℡__Kan透↙ 提交于 2019-12-03 17:05:56
We use Android Youtube API in out application. Lately I noticed that application crashes every time I try to play a video with enabled ads. I'm able to reproduce it using their sample applications . I've tried SimplePlayerFragment and SimplePlayerView examples. Both crash when I try to cue the http://www.youtube.com/watch?v=QudbrUcVPxk video (this is just an example, other videos with ads are failing too). Here is LogCat output: 10-26 19:10:49.074: E/AndroidRuntime(21637): FATAL EXCEPTION: main 10-26 19:10:49.074: E/AndroidRuntime(21637): java.lang.IllegalStateException: android.os

YouTube Android API: YouTubePlayerFragment loading spinner

旧城冷巷雨未停 提交于 2019-12-03 13:55:58
I am using the Android YouTube API samples to create a chromeless YouTube player in my app. I am having an issue that the buffering / loading progress bar carries on displaying over my video even after it has loaded and started playing. I can reproduce this in the FragmentDemoActivity sample with a couple of small modifications: public class FragmentDemoActivity extends AppCompatActivity implements YouTubePlayer.OnInitializedListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fragments_demo); YouTubePlayerFragment