+
+ private buildPeerTubeHelpers (pluginInfo: PluginInfo) {
+ const { plugin } = pluginInfo
+
+ return {
+ getBaseStaticRoute: () => {
+ const pathPrefix = this.getPluginPathPrefix(pluginInfo.isTheme)
+ return environment.apiUrl + `${pathPrefix}/${plugin.name}/${plugin.version}/static`
+ }
+ }
+ }
+
+ private getPluginPathPrefix (isTheme: boolean) {
+ return isTheme ? '/themes' : '/plugins'
+ }