2023-10-20 16:05:38 +02:00
|
|
|
import { MVideo } from '@server/types/models/video/video.js'
|
2023-10-20 15:41:22 +02:00
|
|
|
import { TagsHtml } from './tags-html.js'
|
2023-10-20 16:05:38 +02:00
|
|
|
import { MVideoPlaylist } from '@server/types/models/video/video-playlist.js'
|
2023-10-20 15:41:22 +02:00
|
|
|
|
|
|
|
export class CommonEmbedHtml {
|
|
|
|
|
|
|
|
static buildEmptyEmbedHTML (options: {
|
|
|
|
html: string
|
|
|
|
playlist?: MVideoPlaylist
|
|
|
|
video?: MVideo
|
|
|
|
}) {
|
|
|
|
const { html, playlist, video } = options
|
|
|
|
|
|
|
|
let htmlResult = TagsHtml.addTitleTag(html)
|
|
|
|
htmlResult = TagsHtml.addDescriptionTag(htmlResult)
|
|
|
|
|
|
|
|
return TagsHtml.addTags(htmlResult, { indexationPolicy: 'never' }, { playlist, video })
|
|
|
|
}
|
|
|
|
}
|