【发布时间】:2021-12-31 20:08:01
【问题描述】:
我将我们的 apss agora 版本更新为 3.5.0,因为它无法在 ios 15 上运行。现在它可以在 ios 15 上运行,但不能在 android 上运行。
代码正是以此开头
UNSAFE_componentWillMount() {
this._initEngine();
}
componentWillUnmount() {
this._engine?.destroy();
}
_initEngine = async () => {
this._engine = await RtcEngine.createWithContext(
new RtcEngineContext(config.appId)
);
this._addListeners();
await this._engine.enableVideo();
await this._engine.startPreview();
await this._engine.setChannelProfile(ChannelProfile.LiveBroadcasting);
await this._engine.setClientRole(ClientRole.Broadcaster);
};
它说
TypeError: _reactNativeAgora.RtcEngineContext is not a constructor
【问题讨论】:
标签: react-native agora.io