这是一个创建于 2452 天前的主题,其中的信息可能已经有所发展或是发生改变。
项目接入了阿里点播的 SDK.
用 RCTViewManager 返回了一个 view 给 RN,可以播放.然后获得了视频的播放进度时间.
需要用 RCTEventEmitter 发送事件给 JS 传递播放进度的时间.
但是在 RCTViewManager 的类下面写了 RCTEventEmitter 的对象发送事件.
xcode 就会报错.
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bridge is not set. This is probably because you've explicitly synthesized the bridge in PlayerModuleManager, even though it's inherited from RCTEventEmitter.'
有没有大神指点一下.
2 条回复 • 2018-01-19 16:58:26 +08:00
|
|
2
NonClockworkChen 2018-01-19 16:58:26 +08:00
issue 提到的没解决这个问题
+ (id)allocWithZone:(NSZone *)zone { static RNNotification *sharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedInstance = [super allocWithZone:zone]; }); return sharedInstance; }
|