[jitsi-dev] Doubts and issues with Jitsi Meet API


#1

Hi, Jitsi team!

I tried sent this message four times, but it seems that it did not
arrive to the list. I'm sorry if it turns out repeated. In the fourth
attempt I eliminated two of the three links it had. I am now removing
all the links in the body of the message and putting the output of the
Javascript console in plain text. I'm not sure what else to try if this
does not work.

I'm doing a simple test with Jitsi Meet API. For that I used an
example found in Github.

In my case I tried to hide the 'hangup' button using the following code:

···

-----------------------------------------------------------------------
var interfaceConfigOverwrite = {
   MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite',
'fullscreen', 'fodeviceselection']
}

var api = new JitsiMeetExternalAPI(domain, room, width, height,
  htmlElement, interfaceConfigOverwrite);
-----------------------------------------------------------------------

But that did not work. Something is wrong?

On the other hand, Firefox 52.2.0 ESR seems to work well with the API,
but in Chromium 57.0.2987.98 I only get a gray iframe with nothing else.
These are the errors I'm seeing in the Chromium Javascript console:

-----------------------------------------------------------------------
Uncaught DOMException: Failed to read the 'localStorage' property from
'Window': Access is denied for this document.
    at i
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:84657)
    at new e
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:85268)
    at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:86031)
    at Object.defineProperty.value
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:86039)
    at t
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:326)
    at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:10837)
    at Object.n.ADD_ICE_CANDIDATE_FAILED
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:18321)
    at t
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:326)
    at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:393969)
    at Object.n
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:402696)
_.web.js:8 Uncaught ReferenceError: JitsiMeetJS is not defined
    at Object.<anonymous> (_.web.js:8)
    at t (bootstrap 7635740…:19)
    at Object.<anonymous> (app.bundle.min.js:1049)
    at t (bootstrap 7635740…:19)
    at Object.<anonymous> (app.bundle.min.js:46711)
    at t (bootstrap 7635740…:19)
    at Object.<anonymous> (app.bundle.min.js:1642)
    at t (bootstrap 7635740…:19)
    at Object.<anonymous> (app.bundle.min.js:74423)
    at t (bootstrap 7635740…:19)
/favicon.ico Failed to load resource: the server responded with a status
of 404 (Not Found)
-----------------------------------------------------------------------

Thanks in advance.

Kind regards,
Daniel


#2

Is this Chromium on Debian? I just noticed that too! I think localStorage is disabled for some reason and we fail. We shouldn’t, so can you please open an issue on GitHub?

Cheers,

···

On Jul 10, 2017, at 16:40, Daniel Bareiro <daniel-listas@gmx.net> wrote:

Hi, Jitsi team!

I tried sent this message four times, but it seems that it did not
arrive to the list. I'm sorry if it turns out repeated. In the fourth
attempt I eliminated two of the three links it had. I am now removing
all the links in the body of the message and putting the output of the
Javascript console in plain text. I'm not sure what else to try if this
does not work.

I'm doing a simple test with Jitsi Meet API. For that I used an
example found in Github.

In my case I tried to hide the 'hangup' button using the following code:

-----------------------------------------------------------------------
var interfaceConfigOverwrite = {
  MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite',
'fullscreen', 'fodeviceselection']
}

var api = new JitsiMeetExternalAPI(domain, room, width, height,
htmlElement, interfaceConfigOverwrite);
-----------------------------------------------------------------------

But that did not work. Something is wrong?

On the other hand, Firefox 52.2.0 ESR seems to work well with the API,
but in Chromium 57.0.2987.98 I only get a gray iframe with nothing else.
These are the errors I'm seeing in the Chromium Javascript console:

-----------------------------------------------------------------------
Uncaught DOMException: Failed to read the 'localStorage' property from
'Window': Access is denied for this document.
   at i
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:84657)
   at new e
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:85268)
   at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:86031)
   at Object.defineProperty.value
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:86039)
   at t
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:326)
   at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:10837)
   at Object.n.ADD_ICE_CANDIDATE_FAILED
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:18321)
   at t
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:326)
   at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:393969)
   at Object.n
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:402696)
_.web.js:8 Uncaught ReferenceError: JitsiMeetJS is not defined
   at Object.<anonymous> (_.web.js:8)
   at t (bootstrap 7635740…:19)
   at Object.<anonymous> (app.bundle.min.js:1049)
   at t (bootstrap 7635740…:19)
   at Object.<anonymous> (app.bundle.min.js:46711)
   at t (bootstrap 7635740…:19)
   at Object.<anonymous> (app.bundle.min.js:1642)
   at t (bootstrap 7635740…:19)
   at Object.<anonymous> (app.bundle.min.js:74423)
   at t (bootstrap 7635740…:19)
/favicon.ico Failed to load resource: the server responded with a status
of 404 (Not Found)
———————————————————————————————————

--
Saúl


#3

Hi again!

I have noticed that if two users connect through the API with different
browsers, none of them have the moderator mark in the thumbnail (I
thought the first one should be marked as moderator) however it seems
both are moderators since they have the options of Moderator in
"settings". Is this the expected behavior?

Kind regards,
Daniel


#4

Hi, Saúl.

On the other hand, Firefox 52.2.0 ESR seems to work well with the API,
but in Chromium 57.0.2987.98 I only get a gray iframe with nothing else.
These are the errors I'm seeing in the Chromium Javascript console:

-----------------------------------------------------------------------
Uncaught DOMException: Failed to read the 'localStorage' property from
'Window': Access is denied for this document.
   at i
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:84657)
   at new e
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:85268)
   at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:86031)
   at Object.defineProperty.value
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:86039)
   at t
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:326)
   at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:10837)
   at Object.n.ADD_ICE_CANDIDATE_FAILED
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:18321)
   at t
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:326)
   at Object.<anonymous>
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:393969)
   at Object.n
(https://cdn.jitsi.net/2081/libs/lib-jitsi-meet.min.js?v=2081:2:402696)
_.web.js:8 Uncaught ReferenceError: JitsiMeetJS is not defined
   at Object.<anonymous> (_.web.js:8)
   at t (bootstrap 7635740…:19)
   at Object.<anonymous> (app.bundle.min.js:1049)
   at t (bootstrap 7635740…:19)
   at Object.<anonymous> (app.bundle.min.js:46711)
   at t (bootstrap 7635740…:19)
   at Object.<anonymous> (app.bundle.min.js:1642)
   at t (bootstrap 7635740…:19)
   at Object.<anonymous> (app.bundle.min.js:74423)
   at t (bootstrap 7635740…:19)
/favicon.ico Failed to load resource: the server responded with a status
of 404 (Not Found)
———————————————————————————————————

Is this Chromium on Debian? I just noticed that too! I think localStorage
is disabled for some reason and we fail. We shouldn’t, so can you please
open an issue on GitHub?

Thank you for reproducing this. Yes, I'm using Debian. Jessie, to be
more precise. I'll open the issue on Github as soon as I can.

Regarding the other question:

I'm doing a simple test with Jitsi Meet API. For that I used an
example found in Github.

In my case I tried to hide the 'hangup' button using the following
code:
---------------------------------------------------------------------
var interfaceConfigOverwrite = {
  MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite',
'fullscreen', 'fodeviceselection']
}

var api = new JitsiMeetExternalAPI(domain, room, width, height,
htmlElement, interfaceConfigOverwrite);
---------------------------------------------------------------------

But that did not work. Something is wrong?

Could you help me with this? I'm not sure if I'm making a mistake here.

Thanks again.

Kind regards,
Daniel

···

On 10/07/17 13:43, Saúl Ibarra Corretgé wrote:


#5

Is this Chromium on Debian? I just noticed that too! I think localStorage
is disabled for some reason and we fail. We shouldn’t, so can you please
open an issue on GitHub?

Thank you for reproducing this. Yes, I'm using Debian. Jessie, to be
more precise. I'll open the issue on Github as soon as I can.

Thanks!

Regarding the other question:

I'm doing a simple test with Jitsi Meet API. For that I used an
example found in Github.

In my case I tried to hide the 'hangup' button using the following
code:
---------------------------------------------------------------------
var interfaceConfigOverwrite = {
MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite',
'fullscreen', 'fodeviceselection']
}

var api = new JitsiMeetExternalAPI(domain, room, width, height,
htmlElement, interfaceConfigOverwrite);
---------------------------------------------------------------------

But that did not work. Something is wrong?

Could you help me with this? I'm not sure if I'm making a mistake here.

Oh, sorry, I missed it while reading the other email. You are passing the parameters wrong, there are 2 overrides: config and interface. This should do:

var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, undefined, interfaceConfigOverwrite);

Cheers,

···

--
Saúl


#6

In the context of meet.jit.si everyone is a moderator and as this is
enabled, showing stars is pointless.

···

On Jul 21, 2017 07:18, "Daniel Bareiro" <daniel-listas@gmx.net> wrote:

Hi again!

I have noticed that if two users connect through the API with different
browsers, none of them have the moderator mark in the thumbnail (I
thought the first one should be marked as moderator) however it seems
both are moderators since they have the options of Moderator in
"settings". Is this the expected behavior?

Kind regards,
Daniel

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#7

Hi, Damian.

> I have noticed that if two users connect through the API with different
> browsers, none of them have the moderator mark in the thumbnail (I
> thought the first one should be marked as moderator) however it seems
> both are moderators since they have the options of Moderator in
> "settings". Is this the expected behavior?

In the context of meet.jit.si everyone is a moderator and as this is
enabled, showing stars is pointless.

Thanks for the clarification. Now that you mention it, I think I had
seen that in the configuration of the Jitsi Meet components it can be
established that all participants become moderators, although I do not
remember now (and I do not find) where I had seen this.

Thanks for your reply.

Kind regards,
Daniel

···

On 21/07/17 10:18, Damian Minkov wrote:


#8

Hi, Saúl.

Is this Chromium on Debian? I just noticed that too! I think localStorage
is disabled for some reason and we fail. We shouldn’t, so can you please
open an issue on GitHub?

Thank you for reproducing this. Yes, I'm using Debian. Jessie, to be
more precise. I'll open the issue on Github as soon as I can.

Thanks!

Thanks to you. Maybe already you has seen the issue published.

I'm doing a simple test with Jitsi Meet API. For that I used an
example found in Github.

In my case I tried to hide the 'hangup' button using the following
code:
---------------------------------------------------------------------
var interfaceConfigOverwrite = {
MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite',
'fullscreen', 'fodeviceselection']
}

var api = new JitsiMeetExternalAPI(domain, room, width, height,
htmlElement, interfaceConfigOverwrite);
---------------------------------------------------------------------

But that did not work. Something is wrong?

Could you help me with this? I'm not sure if I'm making a mistake here.

Oh, sorry, I missed it while reading the other email. You are passing the
parameters wrong, there are 2 overrides: config and interface. This should
do:

var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, undefined, interfaceConfigOverwrite);

Ah! I see that I was passing the parameter in an incorrect position.
Thanks for the observation! I also see that I had used
MAIN_TOOLBAR_BUTTONS and I should have used TOOLBAR_BUTTONS.

One more question: is it possible with this API to get the time each
user was connected to a conference room? Or can you suggest some
strategy to get this information?

Thanks again for your time.

Kind regards,
Daniel

···

On 11/07/17 04:55, Saúl Ibarra Corretgé wrote:


#9

Hi, Saúl.

Is this Chromium on Debian? I just noticed that too! I think localStorage
is disabled for some reason and we fail. We shouldn’t, so can you please
open an issue on GitHub?

Thank you for reproducing this. Yes, I'm using Debian. Jessie, to be
more precise. I'll open the issue on Github as soon as I can.

Thanks!

Thanks to you. Maybe already you has seen the issue published.

I'm doing a simple test with Jitsi Meet API. For that I used an
example found in Github.

In my case I tried to hide the 'hangup' button using the following
code:
---------------------------------------------------------------------
var interfaceConfigOverwrite = {
MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite',
'fullscreen', 'fodeviceselection']
}

var api = new JitsiMeetExternalAPI(domain, room, width, height,
htmlElement, interfaceConfigOverwrite);
---------------------------------------------------------------------

But that did not work. Something is wrong?

Could you help me with this? I'm not sure if I'm making a mistake here.

Oh, sorry, I missed it while reading the other email. You are passing the
parameters wrong, there are 2 overrides: config and interface. This should
do:

var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, undefined, interfaceConfigOverwrite);

Ah! I see that I was passing the parameter in an incorrect position.
Thanks for the observation! I also see that I had used
MAIN_TOOLBAR_BUTTONS and I should have used TOOLBAR_BUTTONS.

One more question: is it possible with this API to get the time each
user was connected to a conference room? Or can you suggest some
strategy to get this information?

Yes, it is: see the “participantJoined” and “participantLeft” events here: https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md

Cheers,

···

On Jul 11, 2017, at 13:43, Daniel Bareiro <daniel-listas@gmx.net> wrote:
On 11/07/17 04:55, Saúl Ibarra Corretgé wrote:

Thanks again for your time.

Kind regards,
Daniel

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
Saúl


#10

Hi,

This is a serverside setting, so if you are using iframe api using
meet.jit.si infrastructure there is no way to change this.

Regards
damencho

···

On Jul 21, 2017 09:26, "Daniel Bareiro" <daniel-listas@gmx.net> wrote:

Hi, Damian.

On 21/07/17 10:18, Damian Minkov wrote:

> > I have noticed that if two users connect through the API with different
> > browsers, none of them have the moderator mark in the thumbnail (I
> > thought the first one should be marked as moderator) however it seems
> > both are moderators since they have the options of Moderator in
> > "settings". Is this the expected behavior?

> In the context of meet.jit.si everyone is a moderator and as this is
> enabled, showing stars is pointless.

Thanks for the clarification. Now that you mention it, I think I had
seen that in the configuration of the Jitsi Meet components it can be
established that all participants become moderators, although I do not
remember now (and I do not find) where I had seen this.

Thanks for your reply.

Kind regards,
Daniel

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#11

Hi,

Hi, Damian.

This is a serverside setting, so if you are using iframe api using
meet.jit.si infrastructure there is no way to change this.

Yes, I understand. Could you please remind me what would be the
variable/property that makes it possible to get that behavior in the server?

Thanks in advance.

Kind regards,
Daniel

···

On 21/07/17 11:50, Damian Minkov wrote:


#12

Hi, Saúl.

One more question: is it possible with this API to get the time each
user was connected to a conference room? Or can you suggest some
strategy to get this information?

Yes, it is: see the “participantJoined” and “participantLeft” events here: https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md

Thanks for your reply.

So I think if I want to know how long the user was in the room, I should
take the time each event occurs and then make the difference, right?

Is the "participantLeft" event triggered *only* when the participant
clicks the "hangup" button? Because, if this is so, then the presence of
the "hangup" button will be absolutely necessary and my idea was to
remove this button to avoid that when hanging up the user is redirected
to the homepage of Jitsi Meet, unless this behavior can be changed and
it is possible to configure when the user presses on "hangup", s/he is
redirected to a different page. Is this possible?

On the other hand, I'm trying to capture the JSON response for the room
joining event, but I have not succeeded. In the API documentation I saw
something like the following:

api.addEventListener(participantJoined, listener);

From what I read, "listener" is a function that I would have to define
to parse the JSON response.

I tried something like this:

···

------------------------------------------------------------------------
var api = new JitsiMeetExternalAPI(domain, room, width, height,
              htmlElement, configOverwrite, interfaceConfigOverwrite);

listener(data) {
               var obj = JSON.parse(data);
               alert(obj.jid);
            }

api.addEventListener(participantJoined, listener(data));
------------------------------------------------------------------------

But when I test that, I lose sight of the iframe for the room. Maybe I'm
making some obvious mistake because I don't have much experience with
Javascript :-/

If you can guide me with this, it would be great :slight_smile:

Thanks in advance.

Kind regards,
Daniel


#13

Hi,

This implies two things, enabling mod_muc_allowners prosody module:
https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_muc_allowners.lua
And setting DISABLE_FOCUS_INDICATOR to true:
https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js#L74

Regards
damencho

···

On Fri, Jul 21, 2017 at 9:58 AM, Daniel Bareiro <daniel-listas@gmx.net> wrote:

On 21/07/17 11:50, Damian Minkov wrote:

Hi,

Hi, Damian.

This is a serverside setting, so if you are using iframe api using
meet.jit.si infrastructure there is no way to change this.

Yes, I understand. Could you please remind me what would be the
variable/property that makes it possible to get that behavior in the server?

Thanks in advance.

Kind regards,
Daniel

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#14

Hi,

Hi, Damian.

> [ Allowing any room occupant to be owners ]

Thanks for your reply.

This implies two things, enabling mod_muc_allowners prosody module:
https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_muc_allowners.lua

I have put this configuration in
/etc/prosody/conf.avail/mod_muc_allowners.lua and then added a symbolic
link to this file in /etc/prosody/conf.d. I guess that would be the
procedure, right?

And setting DISABLE_FOCUS_INDICATOR to true:
https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js#L74

After making this change and restarting Prosody, I made a test. Now
users don't have the moderator mark in the thumbnail, however only the
user who creates the room has available in "settings" the moderator options.

Can this be related to the fact I am using authentication to create the
room?

Thanks again for your time.

Kind regards,
Daniel

···

On 21/07/17 12:04, Damian Minkov wrote:


#15

Hi, Saúl.

One more question: is it possible with this API to get the time each
user was connected to a conference room? Or can you suggest some
strategy to get this information?

Yes, it is: see the “participantJoined” and “participantLeft” events here: https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md

Thanks for your reply.

So I think if I want to know how long the user was in the room, I should
take the time each event occurs and then make the difference, right?

Correct.

Is the "participantLeft" event triggered *only* when the participant
clicks the "hangup" button? Because, if this is so, then the presence of
the "hangup" button will be absolutely necessary and my idea was to
remove this button to avoid that when hanging up the user is redirected
to the homepage of Jitsi Meet, unless this behavior can be changed and
it is possible to configure when the user presses on "hangup", s/he is
redirected to a different page. Is this possible?

Yes, it's only triggered after hangup. You can, however, listen for the readyToClose (double check, I'm on mobile) and redirect anywhere yourself.

On the other hand, I'm trying to capture the JSON response for the room
joining event, but I have not succeeded. In the API documentation I saw
something like the following:

api.addEventListener(participantJoined, listener);

From what I read, "listener" is a function that I would have to define
to parse the JSON response.

I tried something like this:

------------------------------------------------------------------------
var api = new JitsiMeetExternalAPI(domain, room, width, height,
             htmlElement, configOverwrite, interfaceConfigOverwrite);

listener(data) {
              var obj = JSON.parse(data);
              alert(obj.jid);
           }

api.addEventListener(participantJoined, listener(data));
------------------------------------------------------------------------

But when I test that, I lose sight of the iframe for the room. Maybe I'm
making some obvious mistake because I don't have much experience with
Javascript :-/

Use some console.log instead of alert. Also, IIRC you get an object so no need to JSON parse it.

Cheers,

-Saúl

···

On Jul 13, 2017, at 01:35, Daniel Bareiro <daniel-listas@gmx.net> wrote:

If you can guide me with this, it would be great :slight_smile:

Thanks in advance.

Kind regards,
Daniel

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#16

Hi,

Hi,

Hi, Damian.

> [ Allowing any room occupant to be owners ]

Thanks for your reply.

This implies two things, enabling mod_muc_allowners prosody module:
https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_muc_allowners.lua

I have put this configuration in
/etc/prosody/conf.avail/mod_muc_allowners.lua and then added a symbolic
link to this file in /etc/prosody/conf.d. I guess that would be the
procedure, right?

This is not the correct way to enable this. You need to install the
package jitsi-meet-tokens, maybe make a backup of your prosody config
before doing it, cause this plugin will configure it to use tokens.
Then make sure in your config the following line is uncommented:
plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" }

Then under Component "conference.yourdomain.com" "muc", make sure you
have the module enabled:
modules_enabled = { "muc_allowners" }

And setting DISABLE_FOCUS_INDICATOR to true:
https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js#L74

This is correct.

After making this change and restarting Prosody, I made a test. Now
users don't have the moderator mark in the thumbnail, however only the
user who creates the room has available in "settings" the moderator options.

Can this be related to the fact I am using authentication to create the
room?

Restart prosody and you should have all participants as moderators.

Regards
damencho

···

On Sun, Jul 23, 2017 at 3:05 PM, Daniel Bareiro <daniel-listas@gmx.net> wrote:

On 21/07/17 12:04, Damian Minkov wrote:

Thanks again for your time.

Kind regards,
Daniel

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#17

Hi, Saúl.

One more question: is it possible with this API to get the time each
user was connected to a conference room? Or can you suggest some
strategy to get this information?

Yes, it is: see the “participantJoined” and “participantLeft” events here:
https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md

Thanks for your reply.

So I think if I want to know how long the user was in the room, I should
take the time each event occurs and then make the difference, right?

Correct.

Thanks for confirm.

Is the "participantLeft" event triggered *only* when the participant
clicks the "hangup" button? Because, if this is so, then the presence of
the "hangup" button will be absolutely necessary and my idea was to
remove this button to avoid that when hanging up the user is redirected
to the homepage of Jitsi Meet, unless this behavior can be changed and
it is possible to configure when the user presses on "hangup", s/he is
redirected to a different page. Is this possible?

Yes, it's only triggered after hangup. You can, however, listen for the
readyToClose (double check, I'm on mobile) and redirect anywhere
yourself.

Great! This has worked. Thank you very much!

On the other hand, I'm trying to capture the JSON response for the room
joining event, but I have not succeeded. In the API documentation I saw
something like the following:

api.addEventListener(participantJoined, listener);

From what I read, "listener" is a function that I would have to define
to parse the JSON response.

I tried something like this:

------------------------------------------------------------------------
var api = new JitsiMeetExternalAPI(domain, room, width, height,
             htmlElement, configOverwrite, interfaceConfigOverwrite);

listener(data) {
              var obj = JSON.parse(data);
              alert(obj.jid);
           }

api.addEventListener(participantJoined, listener(data));
------------------------------------------------------------------------

But when I test that, I lose sight of the iframe for the room. Maybe I'm
making some obvious mistake because I don't have much experience with
Javascript :-/

Use some console.log instead of alert. Also, IIRC you get an object so no
need to JSON parse it.

Thanks for the observation. I tried something like this:

···

On 13/07/17 02:32, Saúl Ibarra Corretgé wrote:

------------------------------------------------------------------------
function listenerLeft() {
               console.log('A participant left the room');
}

api.addEventListener('participantLeft', listenerLeft);
------------------------------------------------------------------------

Using 'console.log' should I expect to see 'A participant left the room'
in the 'console' tab of Firebug when the participant leaves the room?
Because I'm not getting this when the event occurs. Or maybe I'm missing
something...

Thanks for your time.

Kind regards,
Daniel


#18

Hi,

Hi, Damian.

[ Allowing any room occupant to be owners ]

This implies two things, enabling mod_muc_allowners prosody module:
https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_muc_allowners.lua

I have put this configuration in
/etc/prosody/conf.avail/mod_muc_allowners.lua and then added a symbolic
link to this file in /etc/prosody/conf.d. I guess that would be the
procedure, right?

This is not the correct way to enable this. You need to install the
package jitsi-meet-tokens, maybe make a backup of your prosody config
before doing it, cause this plugin will configure it to use tokens.
Then make sure in your config the following line is uncommented:
plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" }

Then under Component "conference.yourdomain.com" "muc", make sure you
have the module enabled:
modules_enabled = { "muc_allowners" }

Thanks for the observation. I see the version of Prosody I had installed
was replaced by the one provided by the prosody-trunk package.
Previously I made a backup of the configuration in 'conf.avail' as you
suggested.

Then I adapted the file so that it has the changes of the backup,
commenting the lines 'app_id' and 'app_secret', and adding
'modules_enabled = {"muc_allowners"}' and changing 'authentication =
"token"' to authentication = "anonymous".

And setting DISABLE_FOCUS_INDICATOR to true:
https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js#L74

This is correct.

After making this change and restarting Prosody, I made a test. Now
users don't have the moderator mark in the thumbnail, however only the
user who creates the room has available in "settings" the moderator options.

Can this be related to the fact I am using authentication to create the
room?

Restart prosody and you should have all participants as moderators.

After restarting Prosody, Jicofo and JVB could not connect to it because
Prosody was not listening on port 5347. Apparently the new
/etc/prosody/prosody.cfg.lua file provided by prosody-trunk lacks the
line "Include "conf.d/*.cfg.lua". After adding it, the connection with
the other components was restored.

But when I try to create a new room, once I authorize the use of camera
and microphone, I would expect to be asked by user and password and this
does not happen, leaving the screen without showing the video of the
camera even though the camera is turned on.

The logs do not provide much information:

Prosody.log:

Jul 24 17:04:28 mod_bosh info New BOSH session, assigned it sid
'49ad7dea-7fa6-4fba-b8dc-d090e794e893'

Jicofo log does not add any additional entries after this room creation
attempt.

If I can check something else, please let me know.

Thanks for your time.

Kind regards,
Daniel

···

On 24/07/17 11:14, Damian Minkov wrote:


#19

Hi again, Saúl

···

On 13/07/17 16:51, Daniel Bareiro wrote:

On the other hand, I'm trying to capture the JSON response for the room
joining event, but I have not succeeded. In the API documentation I saw
something like the following:

api.addEventListener(participantJoined, listener);

From what I read, "listener" is a function that I would have to define
to parse the JSON response.

I tried something like this:

------------------------------------------------------------------------
var api = new JitsiMeetExternalAPI(domain, room, width, height,
             htmlElement, configOverwrite, interfaceConfigOverwrite);

listener(data) {
              var obj = JSON.parse(data);
              alert(obj.jid);
           }

api.addEventListener(participantJoined, listener(data));
------------------------------------------------------------------------

But when I test that, I lose sight of the iframe for the room. Maybe I'm
making some obvious mistake because I don't have much experience with
Javascript :-/

Use some console.log instead of alert. Also, IIRC you get an object so no
need to JSON parse it.

Thanks for the observation. I tried something like this:

------------------------------------------------------------------------
function listenerLeft() {
               console.log('A participant left the room');
}

api.addEventListener('participantLeft', listenerLeft);
------------------------------------------------------------------------

Using 'console.log' should I expect to see 'A participant left the room'
in the 'console' tab of Firebug when the participant leaves the room?
Because I'm not getting this when the event occurs. Or maybe I'm missing
something...

I have read that Firebug may not be compatible with the current API used
in Firefox 52, so I also tested with the Firefox "Web console", but I
don't see there the message I put in console.log.

I've tried also with the "participantJoined" event, but all I see on the
console after joining the room is this:

------------------------------------------------------------------------
navigator.mozGetUserMedia has been replaced by
navigator.mediaDevices.getUserMedia lib-jitsi-meet.min.js:2:59614
Use of attributes’ nodeValue attribute is deprecated. Use value instead.
app.bundle.min.js:2:1630631
Use of getPreventDefault() is deprecated. Use defaultPrevented instead.
jquery-min.js:3:6335
XML Parsing Error: not well-formed
Location:
Line Number 1, Column 168: (unknown):1:168
Loading mixed (insecure) display content
http://jitsiembed.freesoftware/silueta.jpg” on a secure page[Learn
More] app.bundle.min.js:2:467766
XML Parsing Error: not well-formed
Location:
Line Number 1, Column 168: (unknown):1:168
XML Parsing Error: not well-formed
Location:
Line Number 1, Column 168: (unknown):1:168
Loading mixed (insecure) display content
http://jitsiembed.freesoftware/silueta.jpg” on a secure page[Learn
More] app.bundle.min.js:2:2506137
XML Parsing Error: not well-formed
Location:
Line Number 1, Column 168: (unknown):1:168

------------------------------------------------------------------------

Any advice is apreciated.

Thanks for your time.

Kind regards,
Daniel


#20

Hi again, Damian.

But when I try to create a new room, once I authorize the use of camera
and microphone, I would expect to be asked by user and password and this
does not happen, leaving the screen without showing the video of the
camera even though the camera is turned on.

The logs do not provide much information:

Prosody.log:

Jul 24 17:04:28 mod_bosh info New BOSH session, assigned it sid
'49ad7dea-7fa6-4fba-b8dc-d090e794e893'

Jicofo log does not add any additional entries after this room creation
attempt.

A few minutes later, I got some entries:

Jicofo 2017-07-24 17:08:35.865 WARNING: [52]
org.jitsi.jicofo.ChatRoomRoleAndPresence.log() Focus role unknown
Jicofo 2017-07-24 17:13:35.923 WARNING: [52]
org.jitsi.jicofo.ChatRoomRoleAndPresence.log() Focus role unknown

Kind regards,
Daniel

···

On 24/07/17 17:12, Daniel Bareiro wrote: