ConnectyCube / connectycube-js-sdk-releases

Releases materials for ConnectyCube JS SDK platform https://connectycube.com
9 stars 2 forks source link

_onCallLister is undefined #116

Open LoknathPraj opened 7 months ago

LoknathPraj commented 7 months ago

Updated code:

ConnectyCube.videochat._onCallListener = this._onCallListener; ConnectyCube.videochat._onAcceptListener = this._onAcceptCallListener; ConnectyCube.videochat._onRejectListener = this._onRejectCallListener; ConnectyCube.videochat._onStopListener = this._onStopCallListener; ConnectyCube.videochat.onUserNotAnswerListener = this._onUserNotAnswerListener; ConnectyCube.videochat.onRemoteStreamListener = this._onRemoteStreamListener;

it's was previously working;-

 ConnectyCube.videochat.onCallListener = this._onCallListener;
ConnectyCube.videochat.onAcceptCallListener = this._onAcceptCallListener;
ConnectyCube.videochat.onRejectCallListener = this._onRejectCallListener;
ConnectyCube.videochat.onStopCallListener = this._onStopCallListener;
ConnectyCube.videochat.onUserNotAnswerListener = this._onUserNotAnswerListener;
ConnectyCube.videochat.onRemoteStreamListener = this._onRemoteStreamListener;

i tried both code but this is not working
LoknathPraj commented 7 months ago

Kindly look into this issue i'm trying to fix it from last 3 Days

DaveLomber commented 7 months ago

@LoknathPraj

the correct syntax is ConnectyCube.videochat.onCallListener = this._onCallListener;

what exactly is not working in your case?

cc @ccvlad

ccvlad commented 7 months ago

@LoknathPraj please provide us with more information such as logs, ConnectyCube SDK version, steps to reproduce, what devices are you using etc. what would be helpful to solve the issue

LoknathPraj commented 7 months ago

i'm using this version and i'm getting this error while opening the screen

"react-native-connectycube": "^3.28.0",

LoknathPraj commented 7 months ago

image

DaveLomber commented 7 months ago

@LoknathPraj can you provide a code where you define this._onCallListener It seems it's undefined

DaveLomber commented 7 months ago

Also, will it work if do like this:

 ConnectyCube.videochat.onCallListener = (session, extension) => {
 };

?

LoknathPraj commented 7 months ago

Also, will it work if do like this:

 ConnectyCube.videochat.onCallListener = (session, extension) => {
 };

?

Hi tried this as well but still getting same error.

Do i need to install the webrtc plugin

LoknathPraj commented 7 months ago

also i have installed webrtc but in this case the application is being crashed on open

ccvlad commented 7 months ago

@LoknathPraj You don't need to install the "react-native-webrtc" separately via npm or yarn. Remove it from your "package.json". You need to install "react-native-connectycube" that has the "react-native-webrtc" as self-dependency. Read the guide to connect WebRTC for your React Native iOS and Android projects.

Make sure that:

LoknathPraj commented 7 months ago

I checked again everything is configured properly.

i found that the plugin is not importing properly or might there is some problem in the plugin .

Getting couldnot found the declaration error

image
LoknathPraj commented 7 months ago

npm i --save-dev @types/react-native-connectycube --force

i tried the above command as well. In this i'm getting

image
ccvlad commented 7 months ago

This project doesn't have types.

Declare it in your declaration file. Create a file "modules.d.ts" if not exists:

// for "modules.d.ts"
declare module 'react-native-connectycube';
DaveLomber commented 7 months ago

@LoknathPraj are you able to share your project?

LoknathPraj commented 7 months ago

@LoknathPraj are you able to share your project?

sorry i can't share the project. because of the security reason

LoknathPraj commented 7 months ago

This project doesn't have types.

Declare it in your declaration file. Create a file "modules.d.ts" if not exists:

// for "modules.d.ts"
declare module 'react-native-connectycube';

Thank you let me try this too

LoknathPraj commented 7 months ago

Hi , i'm not using type script in my project.

i'm using folowing version in the project:-

"react": "16.9.0", "react-native": "0.63.0", "react-native-connectycube": "^3.28.0",

ccvlad commented 7 months ago

Then just ignore the warning about types