Open linatan9 opened 2 years ago
@ccvlad I saw your a lot of activities in past topic may be you can help me. Thank you!
Hi @linatan9
Could you show logs from Metro?
@ccvlad Yes of course , here is
[VideoCaptureController] Capture will start RCTLog.js:47 [VideoCaptureController] Capture started janus.umd.js:123 Initializing library janus.umd.js:277 Library initialized: true janus.umd.js:302 Using WebSockets to contact Janus: wss://janus.connectycube.com:8989 janus.umd.js:574 [Janus][isWS] RCTLog.js:47 SocketRocket: In debug mode. Allowing connection to any root cert janus.umd.js:599 [Janus][wsHandlers][open] janus.umd.js:617 [Janus][wsHandlers][message] janus.umd.js:609 Created session: 6446333975491844 janus.umd.js:347 [Janus][this.attach] janus.umd.js:782 [Janus][createHandle] janus.umd.js:889 [Janus][websockets][ws] janus.umd.js:617 [Janus][wsHandlers][message] janus.umd.js:822 [Janus][websockets] janus.umd.js:823 Created handle: 6365877544811614 janus.umd.js:886 [Janus][websockets][pluginHandles[handleId]] cubeVideoCallingConference.js:564 isOnlyAudio: false janus.umd.js:617 [Janus][wsHandlers][message] MeetRoom.js:224 undefined 'ROOM JOIONED' janus.umd.js:617 [Janus][wsHandlers][message] cubeVideoCallingConference.js:951 createOffer, inputParams: {useAudio: true, stream: EventTarget, useVideo: true} cubeVideoCallingConference.js:996 createOffer params: {stream: EventTarget} janus.umd.js:1415 MediaStream provided by the application janus.umd.js:1269 streamsDone: EventTarget {active: true, _tracks: Array(2), id: 'BEE2DAA8-0091-4443-8410-6A61AAE98FB5', _reactTag: 'BEE2DAA8-0091-4443-8410-6A61AAE98FB5', Symbol(listeners): {…}} janus.umd.js:1272 [Janus][pc_config] janus.umd.js:1282 Creating PeerConnection janus.umd.js:1290 Preparing local SDP and gathering candidates (trickle=true) janus.umd.js:1291 Preparing local SDP and gathering candidates (trickle=true) janus.umd.js:1332 Adding local stream janus.umd.js:1372 createOffer janus.umd.js:1723 Creating offer (iceDone=false) janus.umd.js:1741 [Janus][config.pc.createOffer] janus.umd.js:1743 [Janus][mediaConstraints][createOffer] janus.umd.js:617 [Janus][wsHandlers][message] janus.umd.js:347 [Janus][this.attach] janus.umd.js:782 [Janus][createHandle] janus.umd.js:889 [Janus][websockets][ws] MeetRoom.js:67 ConferenceSession {id: '0.19305181247099013', _clientConf: VideoConferencingClient, onSlowLinkListener: undefined, onParticipantJoinedListener: ƒ, onParticipantLeftListener: ƒ, …} 4928369 'tibakoh836@alltekia.com' 'onParticipantJoinedListener=====' janus.umd.js:617 [Janus][wsHandlers][message] janus.umd.js:822 [Janus][websockets] janus.umd.js:823 Created handle: 8148410501878822 janus.umd.js:886 [Janus][websockets][pluginHandles[handleId]] 2janus.umd.js:617 [Janus][wsHandlers][message] janus.umd.js:1415 MediaStream provided by the application janus.umd.js:1269 streamsDone: EventTarget {active: true, _tracks: Array(2), id: 'BEE2DAA8-0091-4443-8410-6A61AAE98FB5', _reactTag: 'BEE2DAA8-0091-4443-8410-6A61AAE98FB5', Symbol(listeners): {…}} janus.umd.js:1272 [Janus][pc_config] janus.umd.js:1282 Creating PeerConnection janus.umd.js:1290 Preparing local SDP and gathering candidates (trickle=true) janus.umd.js:1291 Preparing local SDP and gathering candidates (trickle=true) janus.umd.js:1332 Adding local stream
Don't see any strange in the log above.
You will receive the remote stream in ConnectyCube.videochatconference.onRemoteStreamListener = this.onRemoteStreamListener
Please check the stream in the function onRemoteStreamListener
:
https://github.com/ConnectyCube/connectycube-reactnative-samples/blob/master/RNVideoChatConf/src/components/VideoScreen/index.js#L138
Yes, that was I mean that its not triggered for both users
Is the issue still actual if you return users and other configurations to their original state?
@ccvlad I have installed project and run it. Same issue but one error that I saw in stack
[createAnswer] error: peerConnection is null
[Chat] SENT:
Are you using Android emulator or iOS simulator to test the application?
Ios real device and Android emulator since Android can emulate a camera instead of Ios @ccvlad
Hi, @linatan9
I have tried to start the RNVideoChatConf project from scratch on Android emulator and iOS device and it works.
Set the log console.log(JSON.stringify(ConnectyCube.service.sdkInstance.config))
after ConnectyCube.init(...)
.
Also show logs from start the application where I can see the user login actions, connecting to chat and join to a conference room.
Make sure that the debug mode is on in the config like here
HI, @ccvlad
{"version":"3.13.0","creds":{"appId":385,"authKey":"DFBMs5-dKBBCXcd","authSecret":"SkCW-ThdnmRg9Za"},"endpoints":{"api":"api.connectycube.com","chat":"chat.connectycube.com","muc":"muc.chat.connectycube.com"},"hash":"sha1","chatProtocol":{"bosh":"https://chat.connectycube.com:5281","websocket":"wss://chat.connectycube.com:5291","active":2},"webSession":{"getSessionTimeInterval":3,"getSessionTimeout":120},"chat":{"contactList":{"subscriptionMode":{"mutual":true}},"streamManagement":{"enable":false},"ping":{"enable":false,"timeInterval":60},"reconnect":{"enable":true,"timeInterval":5}},"videochat":{"alwaysRelayCalls":false,"answerTimeInterval":60,"dialingTimeInterval":5,"disconnectTimeInterval":30,"statsReportTimeInterval":false,"iceServers":[{"urls":"stun:stun.l.google.com:19302"},{"urls":"stun:turn.connectycube.com"},{"urls":"turn:turn.connectycube.com:5349?transport=udp","username":"connectycube","credential":"4c29501ca9207b7fb9c4b4b6b04faeb1"},{"urls":"turn:turn.connectycube.com:5349?transport=tcp","username":"connectycube","credential":"4c29501ca9207b7fb9c4b4b6b04faeb1"}]},"conference":{"server":"wss://janus.connectycube.com:8989"},"whiteboard":{"server":"https://whiteboard.connectycube.com"},"urls":{"session":"session","webSession":"session/web","login":"login","users":"users","chat":"chat","blobs":"blobs","subscriptions":"subscriptions","events":"events","data":"data","addressbook":"address_book","addressbookRegistered":"address_book/registered_users","meetings":"meetings","whiteboards":"whiteboards","type":".json"},"on":{"sessionExpired":null,"xmppDataWrite":null,"xmppDataRead":null},"timeout":null,"debug":{"mode":1}}
Hi, @linatan9
I have tried to start the RNVideoChatConf project from scratch on Android emulator and iOS device and it works.
Set the log
console.log(JSON.stringify(ConnectyCube.service.sdkInstance.config))
afterConnectyCube.init(...)
. Also show logs from start the application where I can see the user login actions, connecting to chat and join to a conference room.Make sure that the debug mode is on in the config like here
logs?
@ccvlad Hi, sorry here is logs
Running "RNVideoChat" with {"rootTag":1}
auth-service.js:11 init---> {"version":"3.13.0","creds":{"appId":385,"authKey":"DFBMs5-dKBBCXcd","authSecret":"SkCW-ThdnmRg9Za"},"endpoints":{"api":"api.connectycube.com","chat":"chat.connectycube.com","muc":"muc.chat.connectycube.com"},"hash":"sha1","chatProtocol":{"bosh":"https://chat.connectycube.com:5281","websocket":"wss://chat.connectycube.com:5291","active":2},"webSession":{"getSessionTimeInterval":3,"getSessionTimeout":120},"chat":{"contactList":{"subscriptionMode":{"mutual":true}},"streamManagement":{"enable":false},"ping":{"enable":false,"timeInterval":60},"reconnect":{"enable":true,"timeInterval":5}},"videochat":{"alwaysRelayCalls":false,"answerTimeInterval":60,"dialingTimeInterval":5,"disconnectTimeInterval":30,"statsReportTimeInterval":false,"iceServers":[{"urls":"stun:stun.l.google.com:19302"},{"urls":"stun:turn.connectycube.com"},{"urls":"turn:turn.connectycube.com:5349?transport=udp","username":"connectycube","credential":"4c29501ca9207b7fb9c4b4b6b04faeb1"},{"urls":"turn:turn.connectycube.com:5349?transport=tcp","username":"connectycube","credential":"4c29501ca9207b7fb9c4b4b6b04faeb1"}]},"conference":{"server":"wss://janus.connectycube.com:8989"},"whiteboard":{"server":"https://whiteboard.connectycube.com"},"urls":{"session":"session","webSession":"session/web","login":"login","users":"users","chat":"chat","blobs":"blobs","subscriptions":"subscriptions","events":"events","data":"data","addressbook":"address_book","addressbookRegistered":"address_book/registered_users","meetings":"meetings","whiteboards":"whiteboards","type":".json"},"on":{"sessionExpired":null,"xmppDataWrite":null,"xmppDataRead":null},"timeout":null,"debug":{"mode":1}}
backend.js:32 Debugger and device times have drifted by more than 60s. Please correct this by running adb shell "date date +%m%d%H%M%Y.%S
" on your debugger machine.
n @ backend.js:32
registerWarning @ LogBox.js:117
warnImpl @ LogBox.js:63
console.warn @ LogBox.js:36
emitTimeDriftWarning @ JSTimers.js:459
callFunction @ MessageQueue.js:411
(anonymous) @ MessageQueue.js:109
guard @ MessageQueue.js:359
callFunctionReturnFlushedQueue @ MessageQueue.js:108
(anonymous) @ debuggerWorker.cff11639.js:4
cubeInternalUtils.js:131 [Request][1] POST https://api.connectycube.com/session.json {type: 'POST', url: 'https://api.connectycube.com/session.json', data: {…}}
cubeInternalUtils.js:131 [Response][1] {session: {…}}
cubeInternalUtils.js:131 [Chat] Connect with parameter: {userId: 72780, password: 'videouser1'}
cubeInternalUtils.js:131 [Chat] status - connecting
cubeInternalUtils.js:131 [Chat] status - connect
cubeInternalUtils.js:131 [Chat] CONNECTING
cubeInternalUtils.js:131 [Chat] status - opening
cubeInternalUtils.js:131 [Chat] SENT:
@ccvlad It was tested on Android emulator + Android real device
Hi, @linatan9 !
Sorry, I was afk last days.
Your logs looks fine instead of "peerConnection is null" and empty space after "[Chat] SENT/RECV:"
Are you debugging via Google Chrome console? Could you start app with npm run android
or react-native run-android
and do not open any other debuggers? Only Metro server should works.
There may be a problem with other debuggers, because they slow down the execution of application code. Thus, some parts of the code cannot await for their execution.
backend.js:32 Debugger and device times have drifted by more than 60s. Please correct this by running adb shell "date date +%m%d%H%M%Y.%S" on your debugger machine.
Also it can made the problem. Try to fix.
I'm building a video chat in my mobile application and for first results I clone example project from connectycube (https://github.com/ConnectyCube/connectycube-reactnative-samples)
I didnt change anything in codebase just added my own configs and users (user ids I got from connectycube table https://admin.connectycube.com/apps/***/service/users)
So this listener didn't trigger in any case videoConference and I'm not able to get remote stream of connected user
ConnectyCube.videochatconference.onParticipantJoinedListener = this.onAcceptCallListener.bind(this);
I'm able to handle onParticipantJoinedListener but not previous one.
Not sure that is required code example since its the same as on repository.
If anyone had the same problem before please help me Thanks