Hangon redirect url

Hello All,
I am installing jisti and now i want redirect it on my main website on hang on
I used all possible solution like

change in config file so the redirect to close.html or close2.html or close3.html
this not work for me

than i change in core js file like bundle.js

after the message come disconnect i use js location .href its worked but the main websites comes in i frame

i want that whole redirect on hang on please help

1 Like

Why don’t you add a redirect/ return 302 to your nginx conf file?

From that I’m assuming you’re using IFrame API to load Jitsi? If so, you could try listening to readyToClose event then redirecting when that event is triggered. That way you’d be redirecting on the parent page rather than in the IFrame itself.

If users are not using IFrame and instead accessing site directly, then you can enable enableClosePage in config.js – this will redirect users to close2.html on leaving the conference. You can update close2.html with any content you want, including a redirect to other sites.

I suppose you could also use the enableClosePage approach and redirect using window.top.location.href = ...; that way it works for both IFrame and direct access.

i use readyToClose also but now also its not work

Not working how? Is the event not triggering or it is triggered but redirect is not happening?

Can you share the code snippet where you register the listener and the callback function?

sure sir

	var domain = "domain.com";
	var options = {
		userInfo : { 
			email : '<?php echo $emaill; ?>' , 
			displayName : '<?php echo $unaaame; ?>',
			moderator: true,
		},
		roomName: "<?php echo $rooom; ?>",
		width: "100%",
		height: "100%",
		parentNode: document.querySelector('#container'),
		configOverwrite: {},
		interfaceConfigOverwrite: {
			// filmStripOnly: true
		}
	}
	var api = new JitsiMeetExternalAPI(domain, options);
		api.executeCommand('subject', '<?php echo $ratsetuunn['notif_msg']; ?>');
		
       api.on('readyToClose', () => {
          window.location.href = 'https://domain.com/';
       });

Thanks for your reply

Try api.addListener instead of api.on.

All Ready Try api.addListener too but not working

Hmmm… Strange. Worked when I tried it a few days ago.

You’ll need to pinpoint what’s not working here. Either the event is not triggering or something is blocking your redirect.

Try listening to a few more events, e.g. “raiseHandUpdated”. Then console.log in all callback funcs including readyToClose. Check console to make sure logs happen as expected and if there are errors.

check this on hangon its not worked
and my full script js code is
var domain = “ka-nnect.com”;
var options = {
userInfo : {
email : ‘<?php echo $emaill; ?>’ ,
displayName : ‘<?php echo $unaaame; ?>’,
moderator: true,
},
roomName: “<?php echo $rooom; ?>”,
width: “100%”,
height: “100%”,
parentNode: document.querySelector(’#container’),
configOverwrite: {},
interfaceConfigOverwrite: {
// filmStripOnly: true
}
}
var api = new JitsiMeetExternalAPI(domain, options);
api.executeCommand(‘subject’, ‘<?php echo $ratsetuunn['notif_msg']; ?>’);
api.addListener({
readyToClose: listenerHangup
});
function listenerHangup(){
window.location.href = ‘https://domain.com/’;
}

That’s not right. addListener takes two arguments not an object.

if i use api.addListener (‘readyToClose’, () => {
window.location.href = ‘https://domain.com/’;
});
than also not worked

Have you tried this?

1 Like

Hey Shawn Thank you so much readytoclose not working but raiseHandUpdated is working and triggered thanks lots

You’re welcome.

For the record, if you use meet.jit.si as the server, then “readyToClose” will likely be triggered not when user clicks hangout but after the promo content is closed (with the X at the top right). This is in line with the terms of use for the free service where branding and promo should not be hidden from users.