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.

video still paly when page exit in ios , react native 0.61

See original GitHub issue

Bug

when navigate to another page, video still play . android is ok , ios is bad

Platform

Which player are you experiencing the problem on:

  • iOS

Environment info

React native info output: System: OS: macOS 11.6.2 CPU: (8) x64 Intel® Core™ i7-6820HQ CPU @ 2.70GHz Memory: 2.69 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.22.0 - ~/.nvm/versions/node/v12.22.0/bin/node Yarn: 1.22.0 - /usr/local/bin/yarn npm: 6.14.11 - ~/.nvm/versions/node/v12.22.0/bin/npm Watchman: 2022.01.31.00 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 23, 26, 27, 28, 29, 30 Build Tools: 26.0.1, 28.0.3, 29.0.3, 30.0.2 System Images: android-28 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.1 AI-173.4720617 Xcode: 13.0/13A233 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5

 // paste it here

Library version: x.x.x

Steps To Reproduce

Expected behaviour

Reproducible sample code

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
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
hueniversecommented, Apr 15, 2022

Close dur to lack of steps to reproduce. If you are able to submit a sample app where we can see this issues, we can revisit. You can use https://github.com/hueniverse/react-native-video-test as a template by forking it and making changes.

0reactions
alexfoxycommented, Nov 21, 2022

I have fixed with this component:

import React from 'react'
import RNVideo from 'react-native-video'

let ref: RNVideo | null

const Video = (props: RNVideo['props']) => {
  return <RNVideo
    ref={r => {
      if (!r) {
        // @ts-ignore setNativeProps does not exist on 'Video' .. but it does!
        if (ref?.setNativeProps) ref.setNativeProps({ paused: true })
      } else {
        ref = r
      }
    }}
    {...props}
  />
}

export default Video
Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-video - npm
Start using react-native-video in your project by running `npm i react-native-video`. ... Usage; iOS App Transport Security; Audio Mixing ...
Read more >
How to disable auto play in WebView React Native?
You need to change the property mediaPlaybackRequiresUserAction={true} . Then it will stop the auto play.
Read more >
linker command failed with exit code 1 react native - You.com
This error mostly occur when node modules aren't correctly installed in the react-native-ios. Better check if the pods are installed correctly or the...
Read more >
Change App Icon in React Native for Android and iOS
These guys are doing a great job. You just need to upload your Icon on their website and they will provide multiple sized...
Read more >
React Native YouTube Replica - Medium
For mac users the first thing we should do is download Xcode from the app store and setup the iOS simulator and/or Android...
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