fix(pwa) move manifest to the root
It must be served from the same origin, so we need to bypass the CDN we use for meet.jit.si. See the code comments for the rationale on the workaround.
This commit is contained in:
parent
07d8611988
commit
d067c4e731
|
@ -13,4 +13,5 @@ lang /usr/share/jitsi-meet/
|
||||||
connection_optimization /usr/share/jitsi-meet/
|
connection_optimization /usr/share/jitsi-meet/
|
||||||
resources/robots.txt /usr/share/jitsi-meet/
|
resources/robots.txt /usr/share/jitsi-meet/
|
||||||
resources/*.sh /usr/share/jitsi-meet/scripts/
|
resources/*.sh /usr/share/jitsi-meet/scripts/
|
||||||
pwa-worker.js /usr/share/jitsi-meet/
|
pwa-worker.js /usr/share/jitsi-meet/
|
||||||
|
manifest.json /usr/share/jitsi-meet/
|
||||||
|
|
|
@ -9,8 +9,13 @@
|
||||||
|
|
||||||
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
|
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
|
||||||
<link rel="stylesheet" href="css/all.css">
|
<link rel="stylesheet" href="css/all.css">
|
||||||
<link rel="manifest" href="static/pwa/manifest.json">
|
<link rel="manifest" id="manifest-placeholder">
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// Dynamically generate the manifest location URL. It must be served from the document origin, and we may have
|
||||||
|
// the base pointing to the CDN. This way we can generate a full URL which will bypass the base.
|
||||||
|
document.querySelector('#manifest-placeholder').setAttribute('href', window.location.origin + '/manifest.json');
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
if (!JitsiMeetJS.app) {
|
if (!JitsiMeetJS.app) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -11,17 +11,17 @@
|
||||||
"name": "Jitsi Meet",
|
"name": "Jitsi Meet",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "icons/icon192.png",
|
"src": "static/pwa/icons/icon192.png",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"sizes": "192x192"
|
"sizes": "192x192"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "icons/icon512.png",
|
"src": "static/pwa/icons/icon512.png",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"sizes": "512x512"
|
"sizes": "512x512"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "icons/iconMask.png",
|
"src": "static/pwa/icons/iconMask.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable"
|
"purpose": "maskable"
|
Loading…
Reference in New Issue