1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Fix theme crash in embed

This commit is contained in:
Chocobozzz 2025-05-30 14:58:37 +02:00
parent f85e1a57d4
commit d1bb28374b
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 31 additions and 14 deletions

View file

@ -104,7 +104,7 @@ export class PeerTubeEmbed {
.then(res => res.json())
}
this.peertubeTheme.loadTheme(this.config)
this.peertubeTheme.loadThemeStyle(this.config)
const videoId = this.isPlaylistEmbed()
? await this.initPlaylist()
@ -441,7 +441,14 @@ export class PeerTubeEmbed {
const [ { PeerTubePlayer, videojs } ] = await Promise.all([
this.PeerTubePlayerManagerModulePromise,
this.peertubePlugin.loadPlugins(this.config, await this.translationsPromise)
this.translationsPromise.then(translations => {
this.peertubePlugin.init(translations)
this.peertubePlugin.loadPlugins(this.config)
this.peertubeTheme.loadThemePlugins(this.config)
return this.peertubePlugin.ensurePluginsAreLoaded()
})
])
this.videojs = videojs