+ async getPlaylistEmbedCode (options: { responsive: boolean }) {
+ const { responsive } = options
+ return this.hooks.wrapFun(
+ buildVideoOrPlaylistEmbed,
+ { embedUrl: await this.getPlaylistEmbedUrl(), embedTitle: this.playlist.displayName, responsive },
+ 'video-watch',
+ 'filter:share.video-playlist-embed-code.build.params',
+ 'filter:share.video-playlist-embed-code.build.result'
+ )
+ }
+
+ // ---------------------------------------------------------------------------
+
+ async onUpdate () {
+ if (this.playlist) {
+ this.playlistUrl = await this.getPlaylistUrl()
+ this.playlistEmbedUrl = await this.getPlaylistEmbedUrl()
+ this.playlistEmbedHTML = await this.getPlaylistEmbedCode({ responsive: this.customizations.responsive })
+ this.playlistEmbedSafeHTML = this.sanitizer.bypassSecurityTrustHtml(await this.getPlaylistEmbedCode({ responsive: false }))
+ }
+
+ if (this.video) {
+ this.videoUrl = await this.getVideoUrl()
+ this.videoEmbedUrl = await this.getVideoEmbedUrl()
+ this.videoEmbedHTML = await this.getVideoEmbedCode({ responsive: this.customizations.responsive })
+ this.videoEmbedSafeHTML = this.sanitizer.bypassSecurityTrustHtml(await this.getVideoEmbedCode({ responsive: false }))
+ }