Solve compatibility with react-native-video
When I try to view a 360°-Video, the app crashes with the attached report. The PanoramaView is working just fine. ` 2019-01-21 11:07:54.496514+0100 CPSApp[468:79619] [DYMTLInitPlatform] platform initialization successful
2019-01-21 11:07:54.577341+0100 CPSApp[468:79581] [Accessibility] ****************** Loading GAX Client Bundle ****************
2019-01-21 11:07:54.647 [error][tid:main][RCTBatchedBridge.mm:344] Attempted to register RCTBridgeModule class RCTVideoManager for the name 'VideoManager', but name was already registered by class VideoManager
2019-01-21 11:07:54.647406+0100 CPSApp[468:79581] Attempted to register RCTBridgeModule class RCTVideoManager for the name 'VideoManager', but name was already registered by class VideoManager
2019-01-21 11:07:54.765859+0100 CPSApp[468:79613] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2019-01-21 11:07:54.766070+0100 CPSApp[468:79613] [MC] Reading from public effective user settings.
2019-01-21 11:08:03.535954+0100 CPSApp[468:79581] -[RCTVideo setHidesTransitionView:]: unrecognized selector sent to instance 0x101f3b1d0
2019-01-21 11:08:03.538 [error][tid:main][RCTUIManager.m:1139] Exception thrown while executing UI block: -[RCTVideo setHidesTransitionView:]: unrecognized selector sent to instance 0x101f3b1d0
2019-01-21 11:08:03.538529+0100 CPSApp[468:79581] Exception thrown while executing UI block: -[RCTVideo setHidesTransitionView:]: unrecognized selector sent to instance 0x101f3b1d0
2019-01-21 11:08:03.542 [error][tid:main][RCTUIManager.m:1139] Exception thrown while executing UI block: *** -[__NSArrayM insertObject:atIndex:]: index 3 beyond bounds for empty array
2019-01-21 11:08:03.541907+0100 CPSApp[468:79581] Exception thrown while executing UI block: *** -[__NSArrayM insertObject:atIndex:]: index 3 beyond bounds for empty array `
I managed to narrow it down a bit - the 360-video works when i remove react-native-video from the project. It seems both are not compatible in one project. Anybody able to help? I can offer some paiment for getting both working if that helps.
The project is currently not maintained, unfortunately.
Anyhow I noticed that the react-native-video package has the same name for the ObjC class RCTVideoManager
I encourage you to make a change to this to rename the name (let's say 360VideoManager?), open a PR and I will try to review
Thank you very much for replying. I must admit I'm not familiar when it comes to native code, so I'm not sure it is PR worthy.
I changed in GVRVideo.js:17 : var RCTViedoView = requireNativeComponent('Video', VideoView); to var RCTViedoView = requireNativeComponent('Video360', VideoView);
in VideoManager.h:9 @interface VideoManager : RCTViewManager to @interface Video360Manager : RCTViewManager
in VideoManager.m:14 @implementation VideoManager to @implementation Video360Manager
It is compiling and working on both simulator and actual device. But to be honest, I have no clue what I actually did - I just fiddled around until it worked. If you could give me feedback whether I accidentally got it right, or should be done differently, I'll happily create a PR accordingly.
If you say nope - won't maintain, that's fine (but sad). If it's related to work/money issues, and if you have a legal entity that can send invoices, I might be able to get some (small) funds for some support like this (and maybe we could discuss this someplace else then).
In any case, thank you for time and effort.
I do think to have something like gitcoin.co would open up access to a broader (cheaper) audience than just banked legal entities. I'll let you know btw