question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

presentFullscreenPlayer() doesn't work properly on iOS. (only audio is played)

See original GitHub issue

Bug

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

  1. using <Video/> component, and add Ref. (set controls property is false)
  2. 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)
  3. I’ve tried using both the fullscreen property of <Video/> and presentFullscreenPlayer() but it’s the same issue in IOS.
  4. The full screen function using the controls property works fine, but the above issue occurs when using presentFullscreenPlayer().

Expected behaviour

  1. 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:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
Aaron46commented, Nov 10, 2021

@Tony0205 I have this only on a simulator. I’ve never had this issue on a real device.

1reaction
Ben8823commented, Jun 9, 2022

I have exactly the same issue on iOS. Both on simulator and device.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found