Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo video onFullScreenUpdate is not triggered as expected using the native controls in ios #8393

Closed
YahiaBadr opened this issue May 20, 2020 · 7 comments 路 Fixed by #9323
Closed

Comments

@YahiaBadr
Copy link

馃悰 Bug Report

Environment

Expo CLI 3.20.3 environment info:
System:
OS: Windows 10 10.0.19041
Binaries:
Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Watchman: 4.9.4 - C:\Users\yahya\AppData\Local\watchman\windows\bin\watchman.EXE
IDEs:
Android Studio: Version 3.6.0.0 AI-192.7142.36.36.6241897
npmPackages:
expo: ~37.0.3 => 37.0.7
react: ~16.9.0 => 16.9.0
react-dom: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
react-native-web: ~0.11.7 => 0.11.7

Steps to Reproduce

expo init
expo install expo-av

Adding the video component and use the native controls to open and close the full screen in IOS device.

<Video
          ref={e=>this.video = e}
          source={{ uri: 'http://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4' }}
          rate={1.0}
          volume={1.0}
          isMuted={false}
          resizeMode="cover"
          useNativeControls
          style={{ width: 300, height: 300 }}
          onFullscreenUpdate={(e)=>console.log(e.fullscreenUpdate)}
        />

Expected Behavior

onFullScreenUpdate should be triggered when opening the full screen 2 times and on closing the full screen two times using the native control button.

Actual Behavior

IOS only
The onFullScreenUpdate is triggered 4 times after closing the full screen and it is not triggered on opening the full screen.

Reproducible Demo

https://snack.expo.io/@yahiabadr/f3e4cd

@byCedric
Copy link
Member

byCedric commented May 21, 2020

Hi @YahiaBadr! Thanks for the issue report and repro. I can confirm this is happening, some use cases that are not going "perfect" for me are:

Open fullscreen with the native controls (the one you mentioned)
Nothing is triggered when opening in fullscreen. After closing the fullscreen, all 4 events are triggered but not in the proper order. e.g.

video fullscreen: will present
video fullscreen: did dismiss
video fullscreen: did present
video fullscreen: will dismiss

Opens fullscreen with video.presentFullscreenPlayer
Does trigger the present events in proper order, but when closing fullscreen it triggers the will dismiss twice.

// open fullscreen
video fullscreen: will present
video fullscreen: did present

// closing fullscreen
video fullscreen: will dismiss
video fullscreen: will dismiss
video fullscreen: did dismiss

Closing fullscreen with video.presentFullscreenPlayer (already fixed in #8343)
After trying to reopen the fullscreen video for the second time, I also get this error message from the presentFullscreenPlayer promise:

Fullscreen player is already being presented. Await the first change request.

Thanks for bringing this up, we will investigate it further asap! 馃槃

@IjzerenHein
Copy link
Contributor

IjzerenHein commented Jul 20, 2020

I've submitted a fix for this, PR #9323
Thanks for reporting @YahiaBadr

@IjzerenHein
Copy link
Contributor

Hi! We've released a test-version which fixes this issue.

You can try it out in a bare project using yarn install expo-av@8.4.0.
And you can find the changelog here: https://github.com/expo/expo/blob/master/packages/expo-av/CHANGELOG.md

Let us know whether this fixes the problem for you!

@YahiaBadr
Copy link
Author

Okay, thank you. I will test it and give a feedback.

@YahiaBadr
Copy link
Author

I can confirm that the issue is resolved, thank you for your effort!

@IjzerenHein
Copy link
Contributor

Awesome, and thank you for reporting :)

@IjzerenHein IjzerenHein removed their assignment Jul 28, 2020
@lklima
Copy link

lklima commented Aug 2, 2020

same problem, i'm using sdk 38 and expo-av 8.2.1 the event does not fire on ios 13.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants