Run a function on jibri after jibri has joined

I want to run a function for all users who join conference. If I place it in index.html it runs for other users but not for jibri. Where should i place this function so it is run on jibri too?
here is the function, basically i am using simultaneous interpretation. But jibri records both voices. So i want to mute interpreter voice and record only live.

const interpreter_pattern =  /interpret/i	;
function muteInterPreter(id) {
	console.log('muteInterPreter ' +elem);
	getaudio = document.querySelector('[id^='+elem+']');
	if (!getaudio) { return false;}

function setRecorder() {
	const plist= APP.conference.listMembers();
	plist.forEach(function(value) {
		if (interpreter_pattern.test(value._displayName)) { muteInterPreter(value._id) }


setTimeout(function() {setRecorder();}, 3000);

It should run for jibri too if they are in index.html. Probably one line is failed for jibri. You may find it by checking the jibri logs.

Thanks @emrah , i increased time out to 30 sec and it worked. I may have to find some good value in between.

You may use the following way:

function setRecorder() {
  try {
  } catch(e) {
    setTimeout(function() {setRecorder();}, 3000);

1 Like

@emrah do you have any idea where can I find functions and commands & events supported on server side ( adding in index.html) ( similar to APP.conference.listMembers(); ) , i see some listed in conference.js
specially i am looking for events equivalent to iframe api videoConferenceJoined, participantJoined etc or same will work?

I don’t know a list. I check the source code or the browser console when I need to find them. But I didn’t use an event listener without iframe (IIRC)