import { Block } from '../Block' type VideoContentType = { caption: any[], type: string, external: { url: string } } export class Video extends Block { static tagName:string = 'video' toHTML(): string { const VideoContent:VideoContentType = this.content as VideoContentType const videoUrl = VideoContent.external?.url || '#' const classTag = ['notion', 'video'] if (/https:\/\/www.youtube.com/.test(videoUrl)) { const urlObject = new URL(videoUrl) const youtubeEmbeddedUrl= `https://www.youtube.com/embed/${urlObject.searchParams.get('v')}` || videoUrl return `
` } return `
` } }