ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix service worker registration
Chocobozzz93df58cc4865
diff --git a/client/.angular-cli.json b/client/.angular-cli.jsonindex 3bdc504928..643e1b3198 100644--- a/client/.angular-cli.json+++ b/client/.angular-cli.json@@ -14,12 +14,7 @@"output": "./client/assets/images","allowOutsideOutDir": false},- {- "glob": "",- "input": "./manifest.json",- "output": "./manifest.json",- "allowOutsideOutDir": false- }+ "./manifest.json"],"deployUrl": "client/","index": "index.html",diff --git a/client/src/environments/environment.ts b/client/src/environments/environment.tsindex 42b8baee8b..364da6745c 100644--- a/client/src/environments/environment.ts+++ b/client/src/environments/environment.ts@@ -1,4 +1,3 @@-// The file contents for the current environment will overwrite these during build.// The build system defaults to the dev environment which uses `environment.ts`, but if you do// `ng build --env=prod` then `environment.prod.ts` will be used instead.// The list of which env maps to which file can be found in `.angular-cli.json`.diff --git a/client/src/index.html b/client/src/index.htmlindex 8ff89f6a46..a824a39e2b 100644--- a/client/src/index.html+++ b/client/src/index.html@@ -7,6 +7,8 @@<meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="PeerTube, a decentralized video streaming platform using P2P (BitTorrent) directly in the web browser" />+ <meta name="theme-color" content="#fff" />+<!-- Web Manifest file --><link rel="manifest" href="/manifest.json">diff --git a/client/src/manifest.json b/client/src/manifest.jsonindex 53cfa40c59..707efb9730 100644--- a/client/src/manifest.json+++ b/client/src/manifest.json@@ -1,6 +1,6 @@{- "background_color": "white",- "theme_color": "black",+ "background_color": "#fff",+ "theme_color": "#fff","description": "A federated video streaming platform using P2P","display": "standalone","orientation": "any",diff --git a/server/controllers/client.ts b/server/controllers/client.tsindex f07e421b47..f5124c55be 100644--- a/server/controllers/client.ts+++ b/server/controllers/client.ts@@ -12,6 +12,7 @@ const clientsRouter = express.Router()const distPath = join(root(), 'client', 'dist')const assetsImagesPath = join(root(), 'client', 'dist', 'client', 'assets', 'images')const manifestPath = join(root(), 'client', 'dist', 'manifest.json')+const serviceWorkerPath = join(root(), 'client', 'dist', 'ngsw-worker.js')const embedPath = join(distPath, 'standalone', 'videos', 'embed.html')const indexPath = join(distPath, 'index.html')@@ -27,6 +28,7 @@ clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response,// Static HTML/CSS/JS client filesclientsRouter.use('/manifest.json', express.static(manifestPath, { maxAge: STATIC_MAX_AGE }))+clientsRouter.use('/ngsw-worker.js', express.static(serviceWorkerPath, { maxAge: STATIC_MAX_AGE }))clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE }))clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE }))