presentFullscreenPlayer() doesn't work properly on iOS. (only audio is played)
See original GitHub issueBug
I have some Issue,
In iOS, when presentFullscreenPlayer() of video ref is executed, it becomes fullscreen, but the video stops after 2-3 seconds and only audio is played.
Platform
Which player are you experiencing the problem on:
- iOS
Environment info
- IOS Simulator (I haven’t tested it on a device yet. But it seems to be the same.)
React native info output:
System:
OS: macOS 11.5.2
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 2.50 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.16.0 - /usr/local/bin/node
Yarn: 1.22.10 - ~/.npm-global/bin/yarn
npm: 6.14.11 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 11.0.4 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Library version: 5.2.0
Steps To Reproduce
- using
<Video/>component, and addRef. (setcontrolsproperty isfalse) - When I click custom fullscreen button, fullscreen player open, the video is stop after 2~3 seconds in IOS (but, the video’s audio is running continue)
- I’ve tried using both the
fullscreenproperty of<Video/>andpresentFullscreenPlayer()but it’s the same issue in IOS. - The full screen function using the controls property works fine, but the above issue occurs when using
presentFullscreenPlayer().
…
Expected behaviour
- Using
presentFullscreenPlayer()should play the video normally.
Reproducible sample code
const presentFullScreen = () => {
// setIsPause(true)
videoPlayer.current?.presentFullscreenPlayer()
videoPlayer.current?.seek(0)
}
return (
<Video
ref={videoPlayer}
source={{
uri: videoUri,
}}
paused={isPause}
playInBackground={false}
style={{
width: videoWidth,
height: videoHeight,
}}
controls={false}
repeat={true}
// fullscreen={isFullScreen} it's same issue
/>
)
Video sample
If possible, include a link to the video that has the problem that can be streamed or downloaded from.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Why react native video does not play video in full screen ...
I have solved fullscreen of video frame just adding resizeMode on Video component: <Video source={{ uri:this.state.
Read more >react-native-video - npm
Indicates whether the player should only play the audio track and instead of displaying the video track, show the poster instead.
Read more >Video - Expo Documentation
A function to be called when the state of the native iOS fullscreen view changes (controlled via the presentFullscreenPlayer() and dismissFullscreenPlayer() ...
Read more >Default Player - Introduction · GitBook - Applicaster
Platforms: iOS. audioOnly. Indicates whether the player should only play the audio track. ... false (default) - Don't display the video in fullscreen ......
Read more >React Native fullscreen player. to fix… | by irvin visho - Medium
presentFullscreenPlayer() doesn't work on android ... most important is the ReactMethod, where you get the URL and this open video player.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Tony0205 I have this only on a simulator. I’ve never had this issue on a real device.
I have exactly the same issue on iOS. Both on simulator and device.