Screen sharing

#1

Hi,

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

Thank you.

#2

Starts from here: https://github.com/jitsi/jitsi-meet/blob/c040b3a7ddc828fdaa4304bd2858a2daa6ed0885/conference.js#L1479
then goes in https://github.com/jitsi/jitsi-meet/blob/c040b3a7ddc828fdaa4304bd2858a2daa6ed0885/conference.js#L1513 to create the tracks.

#3

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

#4

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

#5

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

#6

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.

#7

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)

#8

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.

#9

Do you have documentation ?

#10

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.

#11

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) ?

#12

These both for audio:


And for video:


#13

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

#14

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?

#15

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.

#16

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.

#17

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.

#18

Yes external API https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md

#19

@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 = win.open("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)

openexternaapi

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.

externalapihtml

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 = win.open("http://blablabla.com**/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 :

devices

Thank you.

#20

Any idea ?