android-youtube-player icon indicating copy to clipboard operation
android-youtube-player copied to clipboard

My youtube view only showing black screen and only audio is playing. I have upgraded the youtube player.

Open aarushmat opened this issue 4 years ago • 12 comments

aarushmat avatar Jun 30 '20 07:06 aarushmat

It started working by adding android:hardwareAccelerated="true" in manifest

aarushmat avatar Jul 01 '20 06:07 aarushmat

Hi @PierfrancescoSoffritti great library. I'm however facing this issue even though i've added android:hardwareAccelerated="true" to my application tag.

The video load. Audio plays. However there's no video. It's just a black screen. Kindly help.

Below is my xml if recyclerview item <com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView android:id="@+id/youtubePlayerView" android:layout_width="match_parent" android:layout_height="match_parent" />

And here is the code in my adapter fragment.lifecycle.addObserver(itemViewHolder.youtubePlayerView) itemViewHolder.youtubePlayerView.addYouTubePlayerListener(object : AbstractYouTubePlayerListener() { override fun onReady(youTubePlayer: YouTubePlayer) { super.onReady(youTubePlayer) mainYouTubePlayer = youTubePlayer mainYouTubePlayer?.cueVideo(currentVideoId ?: "", 0f) } })

scally-p avatar Jul 16 '20 08:07 scally-p

I am also facing the same problem, is there a way to detect if the video plays with black screen. So that we can refresh the video.

fantasticrahulrai avatar Jul 27 '20 09:07 fantasticrahulrai

We have same issue only with some users

sergiambel avatar Jul 27 '20 09:07 sergiambel

Just try android:hardwareAccelerated="true" or check the ID of youtube link if put correctly.

aarushmat avatar Jul 27 '20 10:07 aarushmat

hi dear, android:hardwareAccelerated = "true" doesn't solves the problem. Have already tried that with app level and activity level.

Just try android:hardwareAccelerated="true" or check the ID of youtube link if put correctly.

fantasticrahulrai avatar Jul 27 '20 10:07 fantasticrahulrai

It started working by adding android:hardwareAccelerated="true" in manifest

THIS ONE WORKED FOR ME!!!!

mubahood avatar Aug 30 '20 12:08 mubahood

android:hardwareAccelerated="true" doesn't work for me, testing on Android nexus 5x

amirdora avatar Mar 06 '21 23:03 amirdora

Just try android:hardwareAccelerated="true" or check the ID of youtube link if put correctly.

Works for me

razzlakki avatar May 22 '21 05:05 razzlakki

android:hardwareAccelerated="true"

this solution is working for me

sanjaymanvani23 avatar Jun 30 '21 10:06 sanjaymanvani23

This solution is not working for me

jinjin-lee avatar Jul 03 '21 04:07 jinjin-lee

android:hardwareAccelerated="true" works for me

guiasos avatar Aug 11 '22 16:08 guiasos

Cools, seems like hardware acceleration does it.

It might not fix the problem on an emulator, but I suggest double checking on a real device.

PierfrancescoSoffritti avatar Aug 12 '22 05:08 PierfrancescoSoffritti

ok, I've already tested it on a real device and it's good. I'm using your api to load videos into a feed, like instagram. I have two questions if you can answer me:

  1. can I get rid of related videos showing at the end of a video? the rel option only has options to show from the same channel or from multiple, but no option not to show.
  2. sometimes when tapping on the video a shadow screen appears above the video with some options like account, loop, copy url, copy code...Can I prevent this from happening?

Em sex., 12 de ago. de 2022 às 02:33, Pierfrancesco Soffritti < @.***> escreveu:

Cools, seems like hardware acceleration does it.

It might not fix the problem on an emulator, but I suggest double checking on a real device.

— Reply to this email directly, view it on GitHub https://github.com/PierfrancescoSoffritti/android-youtube-player/issues/594#issuecomment-1212745369, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2POMLKRHUC3SQDMSRPK4DDVYXO3XANCNFSM4OL5ZE5Q . You are receiving this because you commented.Message ID: <PierfrancescoSoffritti/android-youtube-player/issues/594/1212745369@ github.com>

guiasos avatar Aug 13 '22 14:08 guiasos

can I get rid of related videos showing at the end of a video? the rel option only has options to show from the same channel or from multiple, but no option not to show.

google's web player doesn't allow to remove that.

sometimes when tapping on the video a shadow screen appears above the video with some options like account, loop, copy url, copy code...Can I prevent this from happening?

see #848

PierfrancescoSoffritti avatar Aug 15 '22 10:08 PierfrancescoSoffritti