Screen sharing


Do you know where are located files about screen sharing functionnality (jitsi-meet) ?

Thank you.

Starts from here:
then goes in to create the tracks.

Is it the portion of code which is executed when the screen sharing button is pressed ?

Yes it is. You can always open add a breakpoint there and test it yourself.

1 Like

Okay thank you.
Are there diagrams / schemas documentation to understand organization between functions ?

No there is no such. And we are working slowly of removing conference.js code to move it to the react folder and share as much code as possible with mobile.

Is there a way to open the conference (same room), but in a new tab when I click on a button ? (to open screen sharing on a new tab, for example)

You can add your code and open new tab in same meeting, we have I think url params to enable screensharing, so I think its doable.

Do you have documentation ?

All url params are configs you can overwrite with hash in the url, for the params, check config.js file, all should be documented there.

I tested parameters in config.js.

Do you know if there are other params (or other way) to block audio flow(input) and video flow (input) ?

These both for audio:

And for video:

Yes I know but how can I block input audio stream and input video stream which are received from other participants ?

I don’t understand your question then. Those properties can force other participants to not send audio and video on the start when entering a conference. Isn’t this what you want?

Concretely, I’m trying to open screen sharing in an other tab.
So when I click on screen sharing button, it opens a new tab (so it creates a new members obviously), with screen sharing activated by default. So what I want is to block input stream coming from other participants.
So the new “tab” will be just for sharing the screen (no input stream, etc.), it’s to get around the fact we currently can’t share video and screen in the same time.

And obviously, i would like to kill the sharing screen participant when the user who decided to share his screen is disconnected

To recapitulate, I think the only way to give possibility to send 2 video streams is to create an other participant (so another tab) which will be for sharing screen.
First participant shares video, and participant generated (by first participant) shares his screen.

I see … Ok, then my answer in this usecase is, I don’t know.
As somebody pointed you may be able to use an iframeAPI in the second tab and pass null devices for input and output … maybe you can explore that path. Devices are not controllable using URL params.

That’s quite difficult to immerse myself in that environment(app structure, etc.).
Do I need to use jitsi-meet external API ?
I just know it’s used in electron and web applications which want to embed jitsi-meet.

Yes external API

@damencho I tried to use the external API inside the server but I don’t think it’s possible.

In _switchToScreenSharing() function, I executed a function to open a new tab :

let win ="http://localhost:8080/test, ...)
Obviously, it works.

But I created a function _openExternalAPI() to create JitsiMeetExternalAPI object with some parameters in order to test (configOverwrite : { startScreenSharing: true}, for example)


I changed parameters to see the difference.

But knowing that when an url like following this one (http://localhost:8080/randomroom) is opened, a conference is automatically joined, It doesn’t join the conference from JitsiMeetExternalAPI object, and parameters are not loaded. (the conference is just joined normally).

But if tried it locally from an html page(just by clicking on file), JitsiMeetExternalAPI object is correctly created, and the screen sharing is directly launched.


Tell me if I’m false but I think if I want to use this method, I need to host a distant file like the one above (api.html) (same principe for electron, it loaded API from outside) then do :

let win ="**/api.html**?currentroomname=test, …)`
(when we click on sharing screen button)

api.html : distant file which would be used to generate JitsiMeetExternalAPI
currentroomname=test : The idea would be to get url parameters (inside api.html) in order to create the right object (JitsiMeetExternalAPI) with the right parameters.

Do you have any other ideas ?
I’m not sure about what i’m telling :grimacing:

Otherwise, do you know what are . I tried to execute getAvailableDevices() function, and I got a sort of hash :


Thank you.

Any idea ?