You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Expo video player. Call videoRef?.current?.presentFullscreenPlayer();
Close the player by tapping the close icon with native controls. Now call presentFullscreenPlayer again. On iOS it throws "Fullscreen player is already being presented"
On android it works perfectly. It will let me tap a button to go to full screen, close it, tap it again. Here's the full code inside a component
<TextonPress={async()=>{awaitScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.LANDSCAPE_LEFT,);awaitvideoRef?.current?.playAsync();videoRef?.current?.presentFullscreenPlayer();}}>
Press for full screen and rotate
</Text><Videoref={videoRef}onFullscreenUpdate={async({ fullscreenUpdate })=>{if(fullscreenUpdate===Video.FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS){awaitScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP,);}}}source={{uri: data?.videoUrlasstring,}}onLoad={()=>setLoading(false)}rate={1.0}volume={1.0}isMuted={false}resizeMode="cover"useNativeControlsshouldPlay={autoStart}style={{width: '100%',height: 300,borderRadius: 8}}/>
Expected Behavior
Allow me to call present fullscreen a second time after the user closes the video.
Actual Behavior
Can only call the method one time, then it throws an error even when the video is no longer in full screen
馃悰 Bug Report
Environment
Expo CLI 3.17.23 environment info:
System:
OS: macOS 10.15.4
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6308749
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
npmPackages:
expo: ~37.0.3 => 37.0.5
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz => 0.61.4
npmGlobalPackages:
expo-cli: 3.17.23
iOS, and android app targets
Steps to Reproduce
Use Expo video player. Call
videoRef?.current?.presentFullscreenPlayer();
Close the player by tapping the close icon with native controls. Now call presentFullscreenPlayer again. On iOS it throws "Fullscreen player is already being presented"
On android it works perfectly. It will let me tap a button to go to full screen, close it, tap it again. Here's the full code inside a component
Expected Behavior
Allow me to call present fullscreen a second time after the user closes the video.
Actual Behavior
Can only call the method one time, then it throws an error even when the video is no longer in full screen
Reproducible Demo
https://snack.expo.io/@zachrebuild/eager-waffle
This runs on ios just fine, but has an issue running on the snack player. just open it inside the expo app on your phone.
Tap the text. it works. close full screen. tap again. video does not enter full screen mode.
The text was updated successfully, but these errors were encountered: