1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Add live autostart/messages in embed

This commit is contained in:
Chocobozzz 2022-05-31 14:18:41 +02:00
parent f1a0f3b701
commit d3f4689bde
No known key found for this signature in database
GPG key ID: 583A612D890159BE
8 changed files with 130 additions and 3 deletions

View file

@ -30,6 +30,7 @@ import { MAccountActor, MChannelActor } from '../types/models'
import { getActivityStreamDuration } from './activitypub/activity'
import { getBiggestActorImage } from './actor-image'
import { ServerConfigManager } from './server-config-manager'
import { isTestInstance } from '@server/helpers/core-utils'
type Tags = {
ogType: string
@ -232,7 +233,10 @@ class ClientHtml {
static async getEmbedHTML () {
const path = ClientHtml.getEmbedPath()
if (ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path]
// Disable HTML cache in dev mode because webpack can regenerate JS files
if (!isTestInstance() && ClientHtml.htmlCache[path]) {
return ClientHtml.htmlCache[path]
}
const buffer = await readFile(path)
const serverConfig = await ServerConfigManager.Instance.getHTMLServerConfig()