LonelyCpp / react-native-youtube-iframe

A wrapper of the Youtube-iframe API built for react native.
https://lonelycpp.github.io/react-native-youtube-iframe/
MIT License
603 stars 153 forks source link

Statistic button responses on Pixel 6 Pro Android 12 #224

Closed Avishayy closed 1 year ago

Avishayy commented 2 years ago

Describe the bug Here's a video with the issue:

https://user-images.githubusercontent.com/5567310/152987697-27233894-331b-4e0b-930b-873912a9e905.mp4

As you can see there are two issues:

  1. The settings menu appears without me doing anything
  2. Some buttons need more than one press to work, I tried pressing in different variations, but the result is the same (Note that the timeline works just fine, no issues there)

To Reproduce I only have the video, I tried on a Pixel 3 Android 12 emulator and it works as expected, sadly there's no Pixel 6 Pro emulator

Expected behavior Buttons should work, settings shouldn't appear without me pressing them

Smartphone (please complete the following information):

Additional context This happens both on debug and release

Kakasi-Daniel commented 2 years ago

Encountered the same issue on all of the devices. I tried using past versions,... didn't work =(( .

LonelyCpp commented 2 years ago

YouTube doesn't really give us any options to disable this context menu. (we get the same menu on desktop when we right-click)

I've mentioned the problem some possible workarounds here : https://lonelycpp.github.io/react-native-youtube-iframe/remove-context-share

did you guys try this?

Kakasi-Daniel commented 2 years ago

That means that the user will no longer have access to other controls =((

Avishayy commented 2 years ago

Although the context menu is annoying, the bigger issue here is buttons not responding statistically.

The workaround is also not a good solution because you can't start a video that wasn't set to auto play.

Kakasi-Daniel commented 2 years ago

You can map a boolean state to play prop, and trigger the state whenever the upper Pressable is tapped

LonelyCpp commented 2 years ago

yep, all these are hackish workarounds.

if you guys figure out a good way to avoid the "long press context menu", let me know. I'll add it in the docs :)

Avishayy commented 1 year ago

I just remembered I opened this issue, so I figured out I might as well update with what was the real issue and the fix for me.

I've been using YoutubePlayer inside a Modal component by react-native-modals. The library is not maintained and it has issues with Touchable items in it on Android, we've had issues with buttons not working reliably.

The fix was to use another library, I migrated to react-native-modal and I can happily say that now there are 0 issues in the player!

Cheers.

nazam1998 commented 1 year ago

I am having the same issue for react-native-modalize The video is inside a ScrollView, inside a Modal.

Avishayy commented 1 year ago

I am having the same issue for react-native-modalize The video is inside a ScrollView, inside a Modal.

The issue is not with this library (youtube player), try migrating to react-native-modal instead