Questions tagged [android-youtube-api]

The YouTube Android Player API enables you to incorporate video playback functionality into your Android applications.

The YouTube Android Player API enables you to incorporate video playback functionality into your Android applications. The API defines methods for loading and playing YouTube videos (and playlists) and for customizing and controlling the video playback experience.

962 questions
37
votes
6 answers

Embed Youtube video inside an Android app

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…
Idan
  • 9,880
  • 10
  • 47
  • 76
33
votes
1 answer

YouTube video playback with ExoPlayer

I am interested in using the ExoPlayer for YouTube video playback. I see from the ExoPlayer samples that they play YouTube videos via DASH URLs. I'm using the Android YouTube API to search for videos, and don't see a means for obtaining a DASH URL…
Lo-Tan
  • 2,725
  • 1
  • 26
  • 27
27
votes
2 answers

YouTube Api for android exception "service_missing"

I want to play you tube video in my android application I got exception while youtube initialization like "service_missing". I write following code, package com.example.youtubedemo; import android.os.Bundle; import android.view.Menu; import…
Hardik Patel
  • 273
  • 1
  • 3
  • 5
26
votes
6 answers

Why YouTube Player API does not work on Android 11?

I tried the project explained on this YouTube video of how to play YouTube videos on Android apps: https://www.youtube.com/watch?v=Up9BjrIuoXY I tried to play YouTube videos with devices using Android 9 and Android 10 and the videos are played…
Misael L.
  • 261
  • 1
  • 3
  • 4
24
votes
1 answer

Android 4.4 KitKat random crash (Native crash at /system/lib/libc.so)

I built an app that plays YouTube iframe video via WebView and controls video with YouTube iframe api. (I know that YouTube SDK for Android may be more recommended for Android app development, but for now only iframe api fits our need) I found out…
20
votes
5 answers

Android YouTube API "An error occurred while initializing YouTube player"

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.-.…
pojta
  • 201
  • 1
  • 2
  • 5
20
votes
1 answer

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

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…
user3711987
  • 303
  • 2
  • 9
19
votes
4 answers

Android : youtube player has been released

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 =…
Mickey Tin
  • 3,408
  • 10
  • 42
  • 71
18
votes
5 answers

Unable to play some Youtube videos using YouTube Android Player API

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…
Mickey Tin
  • 3,408
  • 10
  • 42
  • 71
18
votes
4 answers

Android L Youtube API - IllegalArgumentException: Service Intent must be explicit

I know that on L I can only bind services that are declared explicit. In my app I'm currently using Youtube API and when running on devices with L I always get this error java.lang.IllegalArgumentException: Service Intent must be explicit: Intent {…
TheModularMind
  • 2,024
  • 2
  • 22
  • 36
16
votes
1 answer

Exposing Fragment in React Native Android ViewManager

I am attempting to wrap the YouTube Android API as a UI Component for React Native. I have been successful in the Android configuration of things (getting onInitializationSuccess), however I am unable to figure out how get the YouTubePlayerView back…
stan229
  • 2,592
  • 19
  • 23
15
votes
4 answers

com.google.android.gms.auth.GoogleAuthException: UNREGISTERED_ON_API_CONSOLE

Im implementing an android app that enables users to stream to a youtube channel straight from the app. I have created an API key and a OAuth 2.0 client ID But I get a the following exeption: com.google.android.gms.auth.GoogleAuthException:…
Jean-Paul Kouma
  • 243
  • 1
  • 3
  • 7
15
votes
1 answer

YouTube api: Not connected. Call connect() and wait for onConnected() to be called

I am using YouTubeFragment in an Android app and getting following crash on Android 4+ devices. java.lang.IllegalStateException: Not connected. Call connect() and wait for onConnected() to be called. at…
tarkeshwar
  • 4,105
  • 4
  • 29
  • 35
15
votes
1 answer

Youtube SDK crashes with DeadObjectException when move to youtube app

My app provides youtube view using Youtube Android SDK. No problem showing videos but it crashes with DeadObjectException when opening youtube app. My code is like below //init FragmentTransaction fragmentTransaction =…
kingori
  • 2,406
  • 27
  • 30
1
2 3
64 65