首页 > 解决方案 > 是否可以使用 react native 实现 Comet 聊天?

问题描述

我目前正在开发 x 应用程序,该帐户具有到目前为止我运行的消息传递的一部分,并与网站集成,但有一点我需要从应用程序拨打电话和视频通话,但我停止了,所以我需要某些元素应用程序,调用初始化后,必须调用以下函数

CometChat.startCall(
 sessionID,
 document.getElementById("callScreen"),
 new CometChat.OngoingCallListener({
  onUserJoined: user => {
   /* Notification received here if another user joins the call. */
   console.log("User joined call:", user);
   /* this method can be use to display message or perform any actions if someone joining the call */
  },
  onUserLeft: user => {
   /* Notification received here if another user left the call. */
   console.log("User left call:", user);
   /* this method can be use to display message or perform any actions if someone leaving the call */
  },
  onCallEnded: call => {
   /* Notification received here if current ongoing call is ended. */
   console.log("Call ended:", call);
   /* hiding/closing the call screen can be done here. */
  }
 })
);

我明白了......我认为这不能应用,因为它接收作为参数 adocument.getElementById ('root') 一些经验,确认该技术是否可以用于本机反应。这是利比里亚的文件。

https://prodocs.cometchat.com/docs/js-quick-start

我正在使用 react native 0.65 和 @cometchat-pro/react-native-chat

标签: javascriptreact-nativecometchat

解决方案


推荐阅读