android-youtube-api

How do I play YouTube videos in an Android app if a user does not have the YouTube app installed?

为君一笑 提交于 2019-12-05 11:46:55
I am trying to play YouTube videos in an Android app. I am using YouTubePlayer API and it works well. But the problem is that I want to have this player in the library and if YouTube app is not installed then the movie is not shown and I also have another problem that on some old phones I need to upgrade the YouTube app first. This is a library that other companies will import I do not want to be dependent on version of YouTube app or if user has the YouTube app. How do I gracefully degrade to play videos within the app? Use the YouTubeIntents class in the Android Player API to gracefully

YouTube ads never show while using YouTube Android Player API

大憨熊 提交于 2019-12-05 05:26:53
YouTube ads never show no matter what the player style or what the video. Actual YouTube version: 10.18.55 YouTube Android Player API: 1.2.1 I remember that I saw some ads while was developing my app. Now I can't see any ad after hundreds of tests. This is actually a problem, because my app gets constantly suspended or rejected because of "unauthorized use" of YouTube API. Google Play Support Team thinks that I disable the ads somehow. Please confirm the issue. Same thing happened to me when I was playing video with YoutubeStandalonePlayer API with autoPlay flag set to true. Loading a video

Continue playback of YouTube player while rotating device with separate orientation layouts

烈酒焚心 提交于 2019-12-05 05:18:31
I am trying to add a View containing a YouTube Player to an Activity that keeps on playing when I rotate the device. Since the UI contains more than just the video, I am using a YouTubePlayerFragment . When the orientation changes from portrait to landscape, the system should use a different layout file. This layout also includes the YouTube player as a view which does not take up the whole screen. Below you will find the bare minimum code to reproduce the problem (for a fresh Android app, minimum API level 19). package com.example.youtubefragmenttest; import android.app.FragmentManager;

Youtube API search livestream stop to work

坚强是说给别人听的谎言 提交于 2019-12-05 03:47:04
问题 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} 回答1: You are not alone. It's broken for everybody, unfortunately, and it's been this way for over ten days now. As with all

YouTube player for android crashes on ads playback

醉酒当歌 提交于 2019-12-05 02:36:38
问题 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:

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

戏子无情 提交于 2019-12-05 02:09:06
问题 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

YouTube Android API: YouTubePlayerFragment loading spinner

狂风中的少年 提交于 2019-12-04 21:45:11
问题 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)

App removed from Google Play because of Youtube API problems

北城余情 提交于 2019-12-04 20:45:29
问题 I have developed an application for Android that displays video from my channel on YouTube using YouTube API. I show the video directly through YouTubePlayerView class. I don't use authorization of users on YouTube, just show video in player from my channel. I also use video ad in the same Activity. I show video ad before YouTube video. But I'm not sure that this is so important. Also I have another activity that show list of videos from my channel. For list item I use title of video and

Android youtube API play two or more Youtube players in one main activity

喜你入骨 提交于 2019-12-04 19:29:52
问题 Using the Android Youtube api i want to play two videos in my app main activity without using fragment we have the same problem with this Multiple Youtube players in one activity but has no acceptable answers yet please help us. activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <com.google.android.youtube.player.YouTubePlayerView android:id="@+id

Upload Video on youtube from android application

时间秒杀一切 提交于 2019-12-04 19:16:35
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; import com.google.api.services.youtube.YouTube; import com.google.api.services.youtube.model.Video;