[jitsi-dev] Desktop sharing not working when using external API


#1

Hi,

I have deployed Jitsi Meet and created a Chrome extension and uploaded it to the Chrome web store. I added the ID to config.js. Desktop sharing works when I go directly to my Jitsi Meet website, but if I use the external API to embed it in another web site, it doesn't work anymore. The web site where it is embedded is in the same domain. When I press the screen sharing button it shows the "Extension required" popup with the button that leads to the Chrome extension, but it is already installed. How do I fix this?

Regards,
Markus


#2

Some follow-up on this problem. The problem seems to be that chrome.runtime.sendMessage doesn't reach the extension background script when executing inside the iframe. This can be tested by running chrome.runtime.sendMessage (<ID>, { getVersion: true }, function(response) { console.log(reponse) }); in the console. When running it in the top frame it returns the extension version number but when running it inside the iframe it returns undefined. I don't know yet how to fix this but I will investigate it further.

-Markus

···

From: dev [mailto:dev-bounces@jitsi.org] On Behalf Of markus.kullberg@teliacompany.com
Sent: 10. huhtikuuta 2018 15:58
To: dev@jitsi.org
Subject: [jitsi-dev] Desktop sharing not working when using external API

Hi,

I have deployed Jitsi Meet and created a Chrome extension and uploaded it to the Chrome web store. I added the ID to config.js. Desktop sharing works when I go directly to my Jitsi Meet website, but if I use the external API to embed it in another web site, it doesn't work anymore. The web site where it is embedded is in the same domain. When I press the screen sharing button it shows the "Extension required" popup with the button that leads to the Chrome extension, but it is already installed. How do I fix this?

Regards,
Markus


#3

Hello,

Desktop sharing is working fine for me when using external API.
Have you tried to add the parent window URL to manifest.json file of the extension ?

   "externally_connectable": {
       "matches": [
           "*://jitsimeet.example.com/*",
           "*://parentWindowUrl.meet.example.com/*"
       ]
   }

Regards
Hamza

···

Le 11/04/2018 13:27, > markus.kullberg (par Internet, dépôt dev-bounces@jitsi.org) a écrit :

Some follow-up on this problem. The problem seems to be that chrome.runtime.sendMessage doesn't reach the extension background script when executing inside the iframe. This can be tested by running chrome.runtime.sendMessage (<ID>, { getVersion: true }, function(response) { console.log(reponse) }); in the console. When running it in the top frame it returns the extension version number but when running it inside the iframe it returns undefined. I don't know yet how to fix this but I will investigate it further.

-Markus

FROM: dev [mailto:dev-bounces@jitsi.org] ON BEHALF OF markus.kullberg@teliacompany.com
SENT: 10. huhtikuuta 2018 15:58
TO: dev@jitsi.org
SUBJECT: [jitsi-dev] Desktop sharing not working when using external API

Hi,

I have deployed Jitsi Meet and created a Chrome extension and uploaded it to the Chrome web store. I added the ID to config.js. Desktop sharing works when I go directly to my Jitsi Meet website, but if I use the external API to embed it in another web site, it doesn't work anymore. The web site where it is embedded is in the same domain. When I press the screen sharing button it shows the "Extension required" popup with the button that leads to the Chrome extension, but it is already installed. How do I fix this?

Regards,

Markus

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


#4

Hi,

That's odd. The parent window resides in the same domain as the iframe so it is already whitelisted. Are you using Chrome or Chromium? I'm using Chromium 65.0.3325.181. As a hack I just included the following after the JitsiMeeExternalAPI call:

api.getIFrame().contentWindow.chrome.runtime = window.top.chrome.runtime;

Probably not a good solution and I'm not sure about its implications but at least screen sharing works.

-Markus

···

-----Original Message-----
From: KHAIT Hamza - SG/SPSSI/CPII/DOSE/ET/PNE ANNUAIRE ET MESSAGERIE [mailto:hamza.khait@i-carre.net]
Sent: 11. huhtikuuta 2018 14:59
To: Jitsi Developers <dev@jitsi.org>
Cc: Kullberg, Markus <markus.kullberg@teliacompany.com>
Subject: Re: [jitsi-dev] Desktop sharing not working when using external API

Hello,

Desktop sharing is working fine for me when using external API.
Have you tried to add the parent window URL to manifest.json file of the extension ?

   "externally_connectable": {
       "matches": [
           "*://jitsimeet.example.com/*",
           "*://parentWindowUrl.meet.example.com/*"
       ]
   }

Regards
Hamza

Le 11/04/2018 13:27, > markus.kullberg (par Internet, dépôt dev-bounces@jitsi.org) a écrit :

Some follow-up on this problem. The problem seems to be that
chrome.runtime.sendMessage doesn't reach the extension background
script when executing inside the iframe. This can be tested by running
chrome.runtime.sendMessage (<ID>, { getVersion: true },
function(response) { console.log(reponse) }); in the console. When
running it in the top frame it returns the extension version number
but when running it inside the iframe it returns undefined. I don't
know yet how to fix this but I will investigate it further.

-Markus

FROM: dev [mailto:dev-bounces@jitsi.org] ON BEHALF OF
markus.kullberg@teliacompany.com
SENT: 10. huhtikuuta 2018 15:58
TO: dev@jitsi.org
SUBJECT: [jitsi-dev] Desktop sharing not working when using external
API

Hi,

I have deployed Jitsi Meet and created a Chrome extension and uploaded
it to the Chrome web store. I added the ID to config.js. Desktop
sharing works when I go directly to my Jitsi Meet website, but if I
use the external API to embed it in another web site, it doesn't work
anymore. The web site where it is embedded is in the same domain. When
I press the screen sharing button it shows the "Extension required"
popup with the button that leads to the Chrome extension, but it is
already installed. How do I fix this?

Regards,

Markus

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


Jitsi not detecting Chrome desktop sharing extension