react-native-youtube-iframe icon indicating copy to clipboard operation
react-native-youtube-iframe copied to clipboard

Statistic button responses on Pixel 6 Pro Android 12

Open Avishayy opened this issue 3 years ago • 6 comments

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):

  • Device: Pixel 6 Pro
  • OS + version: Android 12
  • react-native-youtube-iframe version: 2.2.2
  • react-native-webview version: 11.17.1
  • Expo verison [if using expo]: Not using

Additional context This happens both on debug and release

Avishayy avatar Feb 08 '22 12:02 Avishayy

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

Kakasi-Daniel avatar Feb 16 '22 13:02 Kakasi-Daniel

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?

LonelyCpp avatar Feb 16 '22 14:02 LonelyCpp

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

Kakasi-Daniel avatar Feb 16 '22 14:02 Kakasi-Daniel

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.

Avishayy avatar Feb 20 '22 13:02 Avishayy

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

Kakasi-Daniel avatar Feb 20 '22 13:02 Kakasi-Daniel

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 :)

LonelyCpp avatar Feb 22 '22 06:02 LonelyCpp

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.

Avishayy avatar Dec 26 '22 13:12 Avishayy

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

nazam1998 avatar Jan 19 '23 07:01 nazam1998

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

Avishayy avatar Jan 19 '23 09:01 Avishayy