1

I am using react-native-video follow the official document instructions, and under the Android it can be used normally. but under IOS, whenever I click into the page using the Video component, Xcode will throw an error in main.m:

"Thread 1: signal SIGABRT".

enter image description here

Did I miss anything?

LinusGeffarth
  • 27,197
  • 29
  • 120
  • 174
陈黑白
  • 71
  • 3
  • It's difficult to know exactly what going on here with just the information you've posted . If you have a stack trace (in the console in Xcode), please post that - it might give an idea of where the problem lies. That said, this kind of thing is very often caused by some component not being connected up properly (at least in native iOS). – Rich Tolley Jan 18 '18 at 13:00
  • " 2018-01-18 20:22:05.706 [info][tid:com.facebook.react.JavaScript] —— log end —— 2018-01-18 20:22:05.706254+0800 App[52707:1740006] —— log end —— libc++abi.dylib: terminate_handler unexpectedly threw an exception " only these, and this is its URL https://github.com/react-native-community/react-native-video – 陈黑白 Jan 18 '18 at 13:54
  • Have you tried to add Exception breakpoint and see where exactly problem starts? You can do so by following this: (images are old, but the thing in the same) : https://stackoverflow.com/a/17802868/535749 – Oleg Shanyuk Jan 18 '18 at 14:11
  • you need to debugging when you click on that place that causes the crash (Exception). Or, you can try to post the detail of the exception bug. So it can trace where it causes the crash and the actual causes of that crashes – Kasnady Feb 17 '18 at 03:28

1 Answers1

0
{audio_url ? (
 <Video
   source={uri}
   ref={(el) => { this.player = el; }}
   rate={1.0}
   paused={!this.state.status}
   repeat={false}
   muted={false}
   volume={4.0}
   ignoreSilentSwitch="ignore"
   onLoadStart={this._handleLoadStart}
 />) : null}

I found that if put a layer of ternary operator outside it will not happen above the problem, but there is a new problem, audio is not sound!

陈黑白
  • 71
  • 3