How to use Presenter Mode using 'lib-jitsi-meet.min.js'

Dear all,

We have built a Jitsi Project using Jitsi library ‘lib-jitsi-meet.min.js’. In one feature, we want to share the Screen Share track and Video track both simultaneously to other participants. But as per the documentation, if you add both the tracks using room.addTrack(), it will throw exception like ‘Second Video track is not allowed’ as jitsi identify desktop and video track as ‘video’ only.

So, first i have tried this solutions like change desktop trackType manually before room.addTrack(), create multiple connection for the same participant to pass only video and desktop data to other participants but it won’t work as you can’t change the type directly and multiple connections are not allowed.

So after doing some research, i came to know about Presenter Mode that Jitsi has introduced this mode to pass video and desktop track simultaneously. As i am using ‘lib-jitsi-meet’, i can not use it directly. So i have checked the Presenter mode code and tried to apply same code and files in my project.

I have also added ‘JitsiStreamPresenterEffect.js’ file.

To use the Presenter Mode, i have added this lines when creating desktop track and before room.addTrack() :

const effect = _createPresenterStreamEffect(‘360’, cameraDeviceId);
tracks[0].setEffect(effect);

While doing this, it gave me error “TypeError: e.isEnabled is not a function” From “JitsiLocalTrack.js:”. So my question is, if i want to use Presenter Mode using jitsi lib, do i need to add all the files which are related to Presenter Mode like JitsiLocalTrack.js in my project? or is there any other way which can be helpful to achieve this.

Your help will be highly appreciated,
Thank you,
Kedar T.

Can anyone lend assistance? Trying to record presenter mode through the API. Have multiple recording jibri installed and works great recording the camera, but want to also record the screen share. Any assistance would be greatly appreciated.