Comments (5)
I have the exact same issue and here's the errors stack.
2015-04-27 11:14:32.447 SRLnative[55206:1055048] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid number value (NaN) in JSON write'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d481c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c59bbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010d481b9d +[NSException raise:format:] + 205
3 Foundation 0x000000010c239c26 _writeJSONNumber + 748
4 Foundation 0x000000010c235efc _writeJSONValue + 477
5 Foundation 0x000000010c23a46f ___writeJSONObject_block_invoke + 220
6 CoreFoundation 0x000000010d3f5cd5 __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 85
7 CoreFoundation 0x000000010d3f5bec -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 236
8 Foundation 0x000000010c23a080 _writeJSONObject + 376
9 Foundation 0x000000010c235ea6 _writeJSONValue + 391
10 Foundation 0x000000010c23a34d ___writeJSONArray_block_invoke + 130
11 CoreFoundation 0x000000010d3cb026 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 70
12 CoreFoundation 0x000000010d3caf5c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 284
13 Foundation 0x000000010c23a262 _writeJSONArray + 264
14 Foundation 0x000000010c235f3c _writeJSONValue + 541
15 Foundation 0x000000010c23a34d ___writeJSONArray_block_invoke + 130
16 CoreFoundation 0x000000010d3cb026 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 70
17 CoreFoundation 0x000000010d3caf5c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 284
18 Foundation 0x000000010c23a262 _writeJSONArray + 264
19 Foundation 0x000000010c235f3c _writeJSONValue + 541
20 Foundation 0x000000010c23a46f ___writeJSONObject_block_invoke + 220
21 CoreFoundation 0x000000010d3f5cd5 __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 85
22 CoreFoundation 0x000000010d3f5bec -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 236
23 Foundation 0x000000010c23a080 _writeJSONObject + 376
24 Foundation 0x000000010c235ea6 _writeJSONValue + 391
25 Foundation 0x000000010c23a34d ___writeJSONArray_block_invoke + 130
26 CoreFoundation 0x000000010d3cb026 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 70
27 CoreFoundation 0x000000010d3caf5c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 284
28 Foundation 0x000000010c23a262 _writeJSONArray + 264
29 Foundation 0x000000010c235f3c _writeJSONValue + 541
30 Foundation 0x000000010c23a34d ___writeJSONArray_block_invoke + 130
31 CoreFoundation 0x000000010d3cb026 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 70
32 CoreFoundation 0x000000010d3caf5c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 284
33 Foundation 0x000000010c23a262 _writeJSONArray + 264
34 Foundation 0x000000010c235f3c _writeJSONValue + 541
35 Foundation 0x000000010c235cea -[_NSJSONWriter dataWithRootObject:options:error:] + 137
36 Foundation 0x000000010c23876b +[NSJSONSerialization dataWithJSONObject:options:error:] + 345
37 SRLnative 0x000000010bf2967b RCTJSONStringify + 91
38 SRLnative 0x000000010bf19985 __62-[RCTContextExecutor executeJSCall:method:arguments:callback:]_block_invoke + 133
39 SRLnative 0x000000010bf1a9d8 -[RCTContextExecutor executeBlockOnJavaScriptQueue:] + 248
40 Foundation 0x000000010c14d69a __NSThreadPerformPerform + 299
41 CoreFoundation 0x000000010d3b5431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
42 CoreFoundation 0x000000010d3ab2fd __CFRunLoopDoSources0 + 269
43 CoreFoundation 0x000000010d3aa934 __CFRunLoopRun + 868
44 CoreFoundation 0x000000010d3aa366 CFRunLoopRunSpecific + 470
45 SRLnative 0x000000010bf18861 +[RCTContextExecutor runRunLoopThread] + 369
46 Foundation 0x000000010c15009d __NSThread__main__ + 1194
47 libsystem_pthread.dylib 0x0000000110df7268 _pthread_body + 131
48 libsystem_pthread.dylib 0x0000000110df71e5 _pthread_body + 0
49 libsystem_pthread.dylib 0x0000000110df541d thread_start + 13
Precisely, I'm loading a m3u8
from the Twitch API that add arguments to the URL (token, etc)
from react-native-video.
Yes actually I get that error stack too @Swatto
from react-native-video.
Nice idea, @stephendeyoung @Swatto do either of you have time to look into how to accomplish this?
from react-native-video.
I can give it a go. I'd imagine this is going to require some iOS dev knowledge. I've never done anything with iOS or Objective C/Swift before. If you're able to give me any pointers to documentation for AV Foundation that would be great.
from react-native-video.
@stephendeyoung - this looks like the easiest way: https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/02_Playback.html#//apple_ref/doc/uid/TP40010188-CH3-SW1 - scroll down to To create and prepare an HTTP live stream for playback
Alternatively, this seems like another robust solution: https://developer.apple.com/library/ios/samplecode/StitchedStreamPlayer/Introduction/Intro.html
from react-native-video.
Related Issues (20)
- [BUG]: `onTextTracks` Callback Not Logging Subtitles Correctly Despite VTT Files Being Fetched HOT 2
- [BUG]: iOS Audio Ducking on muted or silent video HOT 5
- [BUG]: onSeek event called instantly on Android
- [BUG]: iOS – After returning to active after Mirroring, video auto-restarts HOT 1
- [BUG]: Video's not playing (black screen) specifically on iOS 17.0.2 HOT 3
- [BUG]: requireNativeComponent: "RCTVideo" was not found in the UIManager HOT 3
- [BUG]:v6 beta don‘t load mp4 HOT 3
- [BUG]: v6 don't load Internet source mp4 style file,but local source mp4 and other file style can be loaded HOT 2
- Offline DRM support
- [BUG]: How do i import react native video in swift file (iOS native side) HOT 6
- [BUG]: multi audio selection HOT 2
- [BUG]: In iOS, seek is working perfect in portrait mode but when i rotate my device in landscape then on seek i am getting JSON value '0' of type NSNumber cannot be converted to NSDictionary HOT 7
- [Feature]: Privacy Manifest for Promises SDK HOT 3
- [BUG]: shutterColor not typed in Typescript HOT 3
- [BUG]: AVFoundationErrorDomain on iOS when playing .mp3 file HOT 4
- The screen turns off in fullscreen mode HOT 6
- [BUG]: codepush + RNV6, TypeError: Cannot read property 'ScaleAspectFill' of undefined HOT 3
- [Feature]: Improve error typing and management for entire react-native-video package HOT 2
- [BUG]: React Native Video Player Crashes on iOS and Apple TV with Invalid URL HOT 4
- [BUG]: After 5 to 6 seek operations the player frames starts to lag and flick.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-video.