android-youtube-player
android-youtube-player copied to clipboard
My youtube view only showing black screen and only audio is playing. I have upgraded the youtube player.
It started working by adding android:hardwareAccelerated="true" in manifest
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) } })
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.
We have same issue only with some users
Just try android:hardwareAccelerated="true" or check the ID of youtube link if put correctly.
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.
It started working by adding android:hardwareAccelerated="true" in manifest
THIS ONE WORKED FOR ME!!!!
android:hardwareAccelerated="true" doesn't work for me, testing on Android nexus 5x
Just try android:hardwareAccelerated="true" or check the ID of youtube link if put correctly.
Works for me
android:hardwareAccelerated="true"
this solution is working for me
This solution is not working for me
android:hardwareAccelerated="true" works for me
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.
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:
- 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.
- 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>
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