Possibility to rejoin the existing video call

Hello, at the beginning I would want to thank you for the tool.

We’re integrating with your system in Angular web application. I have a question regarding the video calls. Is there any possibility to rejoin the video session when the receiver, for example has refreshed the page or closed the tab and, in result, it was interrupted? Or maybe we have to end such a call and initiate another one again on the initiator side?

Another question is can we somehow leave the call programmatically? I would want to add a button outside the iframe which would trigger the same action as red button at the bottom on the video call view.

Thanks you in advance for your help.

Hello @duszek37,

When the user leaves the call when the page gets reloaded(it means CometChat session expired and you have to initialize CometChat on page load.) So if you maintain call session id you can use startCall to join the call again.

Warm Regards,

CometChat Pro
Mayur Bhandari

1 Like

Hello @mayur.bhandari and thank you for the answer.

I’ve tried this approach already. Unfortunately, when the application tries to start a call, nothing happens. I mean, no video call is initialized as well as no errors are shown. The same effect occurs when app tries to start a session in a new tab. The video call iframe is injected only when the app fires the startCall() method directly from the $ongoingCall Observable.

Do you know what could be a reason of such behaviour?

My version of SDK is 2.0.12

Hello @duszek37,

Can you please share a small screen share of the issue, it will help us get to the root of the issue.

Warm Regards,

CometChat Pro
Mayur Bhandari

Hi @mayur.bhandari,

Sure thing, here is a sample code:

session.component.ts

ngOnInit() {
	const sessionId: string = this.activatedRoute.snapshot.params.id;
	if (!sessionId) {
		this.router.navigate(['/home']);
	}

	CometChat.startCall(
		sessionId,
		document.getElementById('call-screen'),
		new CometChat.OngoingCallListener({})
	);

	console.log('call started', sessionId);
}

session.component.html

<div id="call-screen"></div>

When app tries to start a video call in a new window, immediately after it was received, sometimes it is started other times no(it looks like it happens randomly). When call was started successfully but, after that, page was refreshed, the effect is as follows: video call iframe is not shown as well as no error has been thrown in console.

Hello @duszek37,

Thank you for sharing the information. We will test this on our end and will get back to you.

Warm Regards,

CometChat Pro
Mayur Bhandari

1 Like