Closed mq-iz closed 1 year ago
Hi @mq-iz, thanks for filling an issue. We need more info in order to help you.
.env
filesI am currently using the membrane video room URL (https://videoroom.membrane.work/).
That's my connection code const onConnectPress = useCallback(async () => { try { await connectAndJoinRoom(); props.navigation.navigate("Room", {id: props.route.params.id, channel: props.route.params.channel}); } catch (err) { showNotification('Error connecting to server', 'error'); } }, [connectAndJoinRoom]);
Here is the connect function from context:
` const connectAndJoinRoom = (async () => {
try {
console.log(SERVER_URL, 'server===========')
console.log(roomName, 'rommname=========');
await connect(SERVER_URL, roomName, {
userMetadata: { displayName: username },
socketChannelParams: {
isSimulcastOn: true,
},
simulcastConfig: {
enabled: true,
// a temporary fix for broken screencast on iOS
// ios devices have a limit on hardware encoders (https://github.com/twilio/twilio-video-ios/issues/17)
// 3 encoders on the simulcast video track + 1 encoder on the screencast track exceeds the limit
// so we're using just two layers for now
// we're going to toggle one layer when turning on screencast but there is a webrtc issue
// with that that needs to be fixed first
activeEncodings:
Platform.OS === "android" ? ["l", "m", "h"] : ["l", "h"],
},
quality: VideoQuality.HD_169,
maxBandwidth: { l: 150, m: 500, h: 1500 },
videoTrackMetadata: { active: isCameraOn, type: "camera" },
audioTrackMetadata: { active: isMicrophoneOn, type: "audio" },
videoTrackEnabled: isCameraOn,
audioTrackEnabled: isMicrophoneOn,
captureDeviceId: currentCamera?.id,
});
console.log('conneection Established======');
await joinRoom();
setVideoroomState("InMeeting");
}
catch(e){
console.log(e,'error==========')
console.warn(e);
room.zip
}
});`
I am attaching the files responsible for connection and room rendering too for further details.
The scenario is working fine for debug builds but for release build connect, join(), disconnect being used from useMembraneServer don't work on first click or as intended.
I have hardcode the serverURL address in videoroomcontext file, I don't think that can be the issue, if it is, do tell me cause i might be wrong.
This code looks nearly identical to our example and we built a release app from the example that connects to https://videoroom.membrane.work/
just yesterday and it's working ok. Hardcoding server url should be ok. For videoroom backend it should be https://videoroom.membrane.work/socket
(note the last part!).
It would be best to provide your whole project (with the android
and ios
folders) so that I can run it and debug myself. A link to github repo would be the best (please don't paste your whole app here ;_;) Without it I'm not able to help you.
If you're unable to provide your project because it's closed source etc. please create a minimal reproducible example and post it as a github repo.
Also please specify if you're running on Android or iOS.
You can close this issue, I have built a separate build by moving out the video call module from my app, but the release build was working fine in a separate project, so I don't know what might be causing my app to not work when I copy the module. Here is the GitHub link to test repo, https://github.com/MuhammadQasim1122/VideoCall-Invochat
I confused how which socket endpoint should I connect to.
JellyFish
Server has 2 sockets one is socket/server
and socker/peer
which one should we use? I have tried both did not work I try to connect via https://videoroom.membrane.work/socket
is work but the video was not able to stream
can update the example more clearly about connecting to join room I also have looked at the example react-native-memebrane-webrtc
but the example does not show how to connect to JellyFish Server
Hi, @chanphiromsok connecting to https://videoroom.membrane.work/socket, should work fine and the video stream is camera recording or screen recording, if it's a screen recording, are you running that on iOS or Android? Another Query @graszka22, if you could provide some insight on it I observed that in my app, when i initiate a call, the camera starts to get used and it doesn't close even on disconnect or captureStop, While in debug build when I initiate a call, the camera doesn't get used until I open it by camera button in the app? I think the reason video call is not working on the release build has something to do with the camera, I am attaching logs for better information.
You can use the camera
2023-05-19 11:53:03.951 9676-9757 TurboLogger com.invochat.co I openPreview
2023-05-19 11:53:03.952 9676-9757 TurboLogger com.invochat.co I is83td8iipfm7r8usd7wwtendh
2023-05-19 11:53:03.954 9676-9757 TurboLogger com.invochat.co I Muhammad Qasim sadasd=====
2023-05-19 11:53:03.966 9676-9757 org.webrtc.Logging com.invochat.co I EglBase14Impl: Using OpenGL ES version 2
2023-05-19 11:53:03.979 9676-9757 AudioEffect com.invochat.co I queryNumberEffects(): *numEffects = 24, ret = 0
2023-05-19 11:53:03.990 9676-9757 org.webrtc.Logging com.invochat.co I WebRtcAudioManagerExternal: Sample rate is set to 48000 Hz
2023-05-19 11:53:03.992 9676-9757 org.webrtc.Logging com.invochat.co I WebRtcAudioManagerExternal: Sample rate is set to 48000 Hz
2023-05-19 11:53:03.992 9676-9757 org.webrtc.Logging com.invochat.co I JavaAudioDeviceModule: createAudioDeviceModule
2023-05-19 11:53:03.992 9676-9757 org.webrtc.Logging com.invochat.co I JavaAudioDeviceModule: HW NS will be used.
2023-05-19 11:53:03.992 9676-9757 org.webrtc.Logging com.invochat.co I JavaAudioDeviceModule: HW AEC will be used.
2023-05-19 11:53:03.992 9676-9757 org.webrtc.Logging com.invochat.co I WebRtcAudioEffectsExternal: ctor@[name=mqt_native_modules, id=10516]
2023-05-19 11:53:03.992 9676-9757 org.webrtc.Logging com.invochat.co I WebRtcAudioRecordExternal: ctor@[name=mqt_native_modules, id=10516]
2023-05-19 11:53:03.993 9676-9757 org.webrtc.Logging com.invochat.co I WebRtcAudioTrackExternal: ctor@[name=mqt_native_modules, id=10516]
2023-05-19 11:53:03.993 9676-9757 org.webrtc.Logging com.invochat.co I NativeLibrary: Loading native library: jingle_peerconnection_so
2023-05-19 11:53:03.993 9676-9757 org.webrtc.Logging com.invochat.co I NativeLibrary: Loading library: jingle_peerconnection_so
2023-05-19 11:53:03.998 9676-9676 InCallManager com.invochat.co D onResume()
2023-05-19 11:53:03.999 9676-9757 org.webrtc.Logging com.invochat.co I PeerConnectionFactory: PeerConnectionFactory was initialized without an injected Loggable. Any existing Loggable will be deleted.
2023-05-19 11:53:04.009 9676-9757 MediaCodec-JNI com.invochat.co W pid:9676,client name:com.invochat.co
2023-05-19 11:53:04.048 9676-9676 ImeFocusController com.invochat.co V onWindowFocus: DecorView@d1a59e9[MainActivity] softInputMode=STATE_UNSPECIFIED|ADJUST_RESIZE|IS_FORWARD_NAVIGATION
2023-05-19 11:53:04.048 9676-9676 ImeFocusController com.invochat.co D onViewFocusChanged, view=DecorView@d1a59e9[MainActivity], mServedView=null
2023-05-19 11:53:04.048 9676-9676 ImeFocusController com.invochat.co V checkFocus: view=null next=DecorView@d1a59e9[MainActivity] force=false package=<none>
2023-05-19 11:53:04.074 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-ms-wma
2023-05-19 11:53:04.075 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-ms-wma
2023-05-19 11:53:04.075 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/mpeg-L1
2023-05-19 11:53:04.075 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/mpeg-L2
2023-05-19 11:53:04.076 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/mpeg-L1
2023-05-19 11:53:04.076 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/mpeg-L2
2023-05-19 11:53:04.076 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/ra
2023-05-19 11:53:04.076 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/ra
2023-05-19 11:53:04.076 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/alac
2023-05-19 11:53:04.077 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/alac
2023-05-19 11:53:04.077 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/ape
2023-05-19 11:53:04.077 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-ape
2023-05-19 11:53:04.077 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/ape
2023-05-19 11:53:04.077 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-ape
2023-05-19 11:53:04.077 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/adpcm
2023-05-19 11:53:04.077 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-ms-adpcm
2023-05-19 11:53:04.078 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/pcm
2023-05-19 11:53:04.078 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/pcm
2023-05-19 11:53:04.078 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/dsd
2023-05-19 11:53:04.078 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/dsd
2023-05-19 11:53:04.080 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/rv
2023-05-19 11:53:04.080 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/rv
2023-05-19 11:53:04.081 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-ms-wmv
2023-05-19 11:53:04.081 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-ms-wmv2
2023-05-19 11:53:04.081 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-ms-wmv
2023-05-19 11:53:04.082 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-ms-wmv2
2023-05-19 11:53:04.082 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/divx3
2023-05-19 11:53:04.082 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/divx3
2023-05-19 11:53:04.083 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/flv1
2023-05-19 11:53:04.085 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-flv
2023-05-19 11:53:04.085 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/flv1
2023-05-19 11:53:04.086 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-flv
2023-05-19 11:53:04.086 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/mjpeg
2023-05-19 11:53:04.086 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-motion-jpeg
2023-05-19 11:53:04.087 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/mjpeg
2023-05-19 11:53:04.087 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-motion-jpeg
2023-05-19 11:53:04.088 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-adpcm-dvi-ima
2023-05-19 11:53:04.088 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-adpcm-dvi-ima
2023-05-19 11:53:04.088 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-adpcm-ms
2023-05-19 11:53:04.089 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/x-adpcm-ms
2023-05-19 11:53:04.089 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/alac
2023-05-19 11:53:04.089 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/alac
2023-05-19 11:53:04.089 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/ape
2023-05-19 11:53:04.090 9676-9757 AudioCapabilities com.invochat.co W Unsupported mime audio/ape
2023-05-19 11:53:04.110 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-ms-wmv
2023-05-19 11:53:04.111 9676-9757 VideoCapabilities com.invochat.co W Unsupported mime video/x-ms-wmv
2023-05-19 11:53:04.136 9676-10312 org.webrtc.Logging com.invochat.co I WebRtcAudioRecordExternal: enableBuiltInAEC(true)
2023-05-19 11:53:04.136 9676-10312 org.webrtc.Logging com.invochat.co I WebRtcAudioEffectsExternal: setAEC(true)
2023-05-19 11:53:04.136 9676-10312 org.webrtc.Logging com.invochat.co I WebRtcAudioRecordExternal: enableBuiltInNS(true)
2023-05-19 11:53:04.137 9676-10312 org.webrtc.Logging com.invochat.co I WebRtcAudioEffectsExternal: setNS(true)
2023-05-19 11:53:04.138 9676-10311 org.webrtc.Logging com.invochat.co I PeerConnectionFactory: onNetworkThreadReady
2023-05-19 11:53:04.141 9676-10313 org.webrtc.Logging com.invochat.co I PeerConnectionFactory: onSignalingThreadReady
2023-05-19 11:53:04.143 9676-10312 org.webrtc.Logging com.invochat.co I PeerConnectionFactory: onWorkerThreadReady
2023-05-19 11:53:04.219 9676-10318 TrafficStats com.invochat.co D tagSocket(170) with statsTag=0xffffffff, statsUid=-1
2023-05-19 11:53:04.989 9676-9757 RNKeychainManager com.invochat.co E No entry found for service: RN_KEYCHAIN_DEFAULT_ALIAS
2023-05-19 11:53:04.990 9676-9757 RNKeychainManager com.invochat.co E No entry found for service: NetworkClientAndroidKeyStore
2023-05-19 11:53:05.099 9676-9757 ReactNativeNotifs com.invochat.co I Cancelling scheduled notification: 2
2023-05-19 11:53:05.245 9676-10316 CameraManagerGlobal com.invochat.co I Connecting to camera service
2023-05-19 11:53:05.271 9676-10326 org.webrtc.Logging com.invochat.co I EglBase14Impl: Using OpenGL ES version 2
2023-05-19 11:53:05.275 9676-10326 BufferQueueConsumer com.invochat.co D [](id:25cc00000001,api:0,p:-1,c:9676) connect: controlledByApp=true
2023-05-19 11:53:05.276 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Get supported formats for camera index 1.
2023-05-19 11:53:05.290 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 4160x3120@20000
2023-05-19 11:53:05.290 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 4160x2352@20000
2023-05-19 11:53:05.290 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 4032x3024@20000
2023-05-19 11:53:05.290 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 4032x2268@20000
2023-05-19 11:53:05.290 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 3264x2448@30000
2023-05-19 11:53:05.290 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 3264x1840@30000
2023-05-19 11:53:05.290 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 3840x2160@30000
2023-05-19 11:53:05.290 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 3120x1440@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2560x1920@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2560x1280@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2320x1740@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2320x1308@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2320x1044@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1728x1728@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2944x1656@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 3072x1418@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2176x2176@30000
2023-05-19 11:53:05.291 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2560x1440@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2320x1080@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 2280x1080@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1920x1440@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1920x1088@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1920x1080@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1600x1200@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1520x720@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1440x1088@30000
2023-05-19 11:53:05.292 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1440x1080@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1080x1080@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1280x1024@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1280x960@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1280x768@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1280x720@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 1024x768@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 960x540@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 800x600@30000
2023-05-19 11:53:05.293 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 720x480@30000
2023-05-19 11:53:05.294 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 640x480@30000
2023-05-19 11:53:05.294 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 352x288@30000
2023-05-19 11:53:05.294 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 320x240@30000
2023-05-19 11:53:05.294 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Format: 176x144@30000
2023-05-19 11:53:05.294 9676-10316 org.webrtc.Logging com.invochat.co I Camera2Enumerator: Get supported formats for camera index 1 done. Time spent: 18 ms.
2023-05-19 11:53:05.295 9676-10316 org.webrtc.Logging com.invochat.co I CameraCapturer: startCapture: 1080x1080@30
2023-05-19 11:53:05.300 9676-10326 org.webrtc.Logging com.invochat.co I Camera2Session: Create new camera2 session on camera 1
2023-05-19 11:53:05.301 9676-10326 org.webrtc.Logging com.invochat.co I Camera2Session: start
2023-05-19 11:53:05.310 9676-10326 org.webrtc.Logging com.invochat.co I Camera2Session: Available preview sizes: [4160x3120, 4160x2352, 4032x3024, 4032x2268, 3264x2448, 3264x1840, 3840x2160, 3120x1440, 2560x1920, 2560x1280, 2320x1740, 2320x1308, 2320x1044, 1728x1728, 2944x1656, 3072x1418, 2176x2176, 2560x1440, 2320x1080, 2280x1080, 1920x1440, 1920x1088, 1920x1080, 1600x1200, 1520x720, 1440x1088, 1440x1080, 1080x1080, 1280x1024, 1280x960, 1280x768, 1280x720, 1024x768, 960x540, 800x600, 720x480, 640x480, 352x288, 320x240, 176x144]
2023-05-19 11:53:05.310 9676-10326 org.webrtc.Logging com.invochat.co I Camera2Session: Available fps ranges: [[10.0:10.0], [5.0:15.0], [15.0:15.0], [15.0:20.0], [20.0:20.0], [24.0:24.0], [5.0:30.0], [30.0:30.0]]
2023-05-19 11:53:05.313 9676-10326 org.webrtc.Logging com.invochat.co I Camera2Session: Using capture format: 1080x1080@[5.0:30.0]
2023-05-19 11:53:05.313 9676-10326 org.webrtc.Logging com.invochat.co I Camera2Session: Opening camera 1
2023-05-19 11:53:05.319 9676-10326 libc com.invochat.co W Access denied finding property "persist.vendor.camera.privapp.list"
2023-05-19 11:53:05.312 9676-9676 CameraCaptureTh com.invochat.co W type=1400 audit(0.0:4950187): avc: denied { read } for name="u:object_r:vendor_camera_mtk_prop:s0" dev="tmpfs" ino=9587 scontext=u:r:untrusted_app:s0:c1,c258,c512,c768 tcontext=u:object_r:vendor_camera_mtk_prop:s0 tclass=file permissive=0 app=com.invochat.co
2023-05-19 11:53:05.321 9676-10326 VivoCameraUtils com.invochat.co D mAudioFeatures registerAudioFeatureCallback successed!
2023-05-19 11:53:05.373 9676-9757 TurboLogger com.invochat.co I serverConnected
serverConnected is the log after await connect finishes and Muhammad Qasim sadasd===== is the log before the await connect function.
I start use android but I want connect to JellyFish server not videostream
@chanphiromsok If it's a React native app, connecting to the server can be done by connect() function, and join room is used to return the participants in the room and their states, video stream is managed by other functions useROOMparticiapants, and others so just using connect can work I guess, although I am having a hard time understanding a use case where you would need to only connect to membrane server. But I guess just using connect with no params or just user metadata would be enough to connect, further @graszka22 can guide you maybe as I am new to it as well.
@graszka22 just for information, the same code of mine is working perfectly fine on iOS build, but it is specifically an issued with android release build, any insight would be extremely helpful.
@chanphiromsok If it's a React native app, connecting to the server can be done by connect() function, and join room is used to return the participants in the room and their states, video stream is managed by other functions useROOMparticiapants, and others so just using connect can work I guess, although I am having a hard time understanding a use case where you would need to only connect to membrane server.
But I guess just using connect with no params or just user metadata would be enough to connect, further @graszka22 can guide you maybe as I am new to it as well.
I have dig dive into source code of JellyFish it has 2 Socket server That's why I don't understand which Socket should I connect to 🤔
@chanphiromsok We're currently working on dedicated mobile client sdks for Jellyfish, for React Native it will be this one: https://github.com/jellyfish-dev/react-native-client-sdk. It's work in progress and we started it this week so you won't be able to test it out yet and there are no docs yet.
This package (react-native-membrane-webrtc) will be working with just membrane rtc engine (so not jellyfish!) and will be a dependency of jellyfish client.
Also https://videoroom.membrane.work is not yet migrated to Jellyfish. So connecting to https://videoroom.membrane.work/socket
with this package should work (it worked for us today). Refer to the https://github.com/jellyfish-dev/react-native-membrane-webrtc#usage section in the readme and the example app in the repo on how to do it. If something is not clear let me know.
@MuhammadQasim1122 I'll try to check out your project, as far as I understand you have 2 problems:
Hi @graszka22 , it seems there been a misunderstanding, the point one is correct, second point is expected scenarios,
file=lib/membrane_rtc_engine/endpoints/webrtc_endpoint.ex line=648 rtc_engine=is83td8iipfm7r8usd7wwtendh [warning] <0.3640.0>/{:endpoint, "97dace6c-db38-40fe-b43f-012c91c74840"}/ Invalid media event "{\"a\":\"join\",\"b\":{\"a\":{\"displayName\":\"Muhammad Qasim\"}}}". Ignoring.
Here is the log of the server, can you tell me what might be casuing this ignoring warning, as this shouldn't be the case, when the videocall connects perfectly.
@chanphiromsok We're currently working on dedicated mobile client sdks for Jellyfish, for React Native it will be this one: https://github.com/jellyfish-dev/react-native-client-sdk. It's work in progress and we started it this week so you won't be able to test it out yet and there are no docs yet.
This package (react-native-membrane-webrtc) will be working with just membrane rtc engine (so not jellyfish!) and will be a dependency of jellyfish client.
Also https://videoroom.membrane.work is not yet migrated to Jellyfish. So connecting to
https://videoroom.membrane.work/socket
with this package should work (it worked for us today). Refer to the https://github.com/jellyfish-dev/react-native-membrane-webrtc#usage section in the readme and the example app in the repo on how to do it. If something is not clear let me know.@MuhammadQasim1122 I'll try to check out your project, as far as I understand you have 2 problems:
when initiating the call the camera starts and is not turned off even after disconnect
when starting the call the camera is not started until a button is pressed
Is that correct?
I thought it suppose to be work with JellyFish Server right now now thanks you
@MuhammadQasim1122 I checked out your project. In VideoroomContext.tsx
there is this line: https://github.com/MuhammadQasim1122/VideoCall-Invochat/blob/main/src/components/videocalls/VideoroomContext.tsx#L44 that is setting isCameraOn
to false
initially.
Then you're connecting with videoTrackEnabled: isCameraOn,
, so initially the camera is disabled. So as for me it's working as intended. When I leave the call, the camera is stopped. If I misunderstood something please answer clearly:
@graszka22
@MuhammadQasim1122 sorry, now you've completely lost me 😅 if the project you linked here works, and the app you're working on doesn't work, then it's probably because there is something different/wrong in your app and not our package. How am I supposed to help you if I have no access to your app and the app you linked doesn't reproduce the issue? :) And this logs don't tell me anything, sorry.
So please again:
Hah sorry for the confusion, I will provide a repo let me just put out some code, the issue was technically with the join room not working. My observation was that await joinroom() isn't being run but while connecting to the server it ends up opening the camera and doesn't stop until app is killed, I am attaching a video that might clarify some more. The join call button is from where the call starts (it's the same as app provided in github repo). Here is the video Link for ease of explanation, gonna share github repo link too once I have committed changes to a branch from where you can clone. https://www.mediafire.com/file/2qr95re6bp73rzr/recording.mov/file
@graszka22 Hi, I figured out the issue, my project was using kotlin version 1.5.20 upgrading it to 1.7.21, fixed all those issues, and there wasn't anything wrong with the code.
Glad to hear it :) Since the issue is solved, I'm closing it
I have implemented my own code using your example app but in debug build the await connect and await join room functions are working perfectly okay but when I generate the release build, the connect and join room function doesn't behave as supposed to, it connects to the server but doesn't join the room and if I somehow join the room, the participant from the mobile doesn't get connected to the same room I don't know why, anyone can look into this?