apivideo / api.video-reactnative-player

React Native video player
https://api.video
MIT License
17 stars 2 forks source link

[Bug]: Fullscreen doesn't work on Android #22

Open charlestbell opened 1 year ago

charlestbell commented 1 year ago

Version

1.0.2

Environment that reproduces the issue

I made an expo snack to illustrate the problem: https://snack.expo.dev/@matt-a/apivideo-programmatic-fullscreen-android-bug

Is it reproducible in the example application?

Yes

Reproduction steps

I am experiencing a bug where calling myRef.current.requestFullscreen() works on ios, but not on android. Here are the steps to reproduce.

1) Open the provided Snack link 2) Choose ios in the right sidebar view, then click 'Tap to Play' 3) When the app launches, press the 'Fullscreen' button in the app Expected behavior: The video goes fullscreen Actual behavior: It does.

4) Get an Android device and install the Expo Go app (Note, api.video player doesn't work in the web version of Expo Snack on Android. Must be run on a real device) 5) Select 'My Device' in the right sidebar of the Expo Snack. This should display a qr code. 6) Launch the camera inside of Expo Go and scan the qr code in the provided Snack 7) When the app launches, press the 'Fullscreen' button Expected behavior: The video goes fullscreen Actual Behavior: Nothing happens

Expected result

The video goes fullscreen

Actual result

Nothing happens

Additional context

No response

Relevant logs output

No response

olivierapivideo commented 1 month ago

Hi there,

First of all, we're sorry it's taken so long to respond to this issue.

Unfortunately, this problem cannot be corrected at present. Using a webview on Android requires the user to have interacted with its content before executing a requestFullscreen. This is a browser security issue that cannot be overridden. In the coming weeks, we plan to release a major version of the RN player based not on a webview but on our 2 native players for Android and IOS. This migration will fix the issues with such restrictions.

We apologize for the inconvenience.

charlestbell commented 1 month ago

Understood. Thank you for getting back.