Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

video-embed: inject custom CSS

kontrollanten2564d97e0d77
diff --git a/client/src/standalone/videos/embed.html b/client/src/standalone/videos/embed.html
index 908aad940b..17029ec415 100644
--- a/client/src/standalone/videos/embed.html
+++ b/client/src/standalone/videos/embed.html
@@ -8,6 +8,7 @@
<meta name="robots" content="noindex">
<meta property="og:platform" content="PeerTube" />
+ <!-- custom css tag -->
<link rel="icon" type="image/png" href="/client/assets/images/favicon.png" />
</head>
diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js
index 70141527c1..d578443fe9 100644
--- a/client/webpack/webpack.video-embed.js
+++ b/client/webpack/webpack.video-embed.js
@@ -122,7 +122,15 @@ module.exports = function () {
title: 'PeerTube',
chunksSortMode: 'auto',
inject: 'body',
- chunks: ['video-embed']
+ chunks: ['video-embed'],
+ minify: {
+ collapseWhitespace: true,
+ removeComments: false,
+ removeRedundantAttributes: true,
+ removeScriptTypeAttributes: true,
+ removeStyleLinkTypeAttributes: true,
+ useShortDoctype: true
+ }
}),
new HtmlWebpackPlugin({
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 43585c591f..6a457a711c 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -210,6 +210,7 @@ class ClientHtml {
let html = buffer.toString()
html = await ClientHtml.addAsyncPluginCSS(html)
+ html = ClientHtml.addCustomCSS(html)
ClientHtml.htmlCache[path] = html