diff --git a/src/extensions/yfm/Video/VideoSpecs/index.ts b/src/extensions/yfm/Video/VideoSpecs/index.ts index 251decf4..ee482042 100644 --- a/src/extensions/yfm/Video/VideoSpecs/index.ts +++ b/src/extensions/yfm/Video/VideoSpecs/index.ts @@ -57,6 +57,13 @@ export const VideoSpecs: ExtensionAuto = (builder, opts) => { const videoId = node.attrs[VideoAttr.VideoID]; if (availableServices.has(service) || !videoId) { + // TODO: remove in next major + // see https://github.com/gravity-ui/markdown-editor/pull/478 + let src = ''; + if (typeof (options as any).url === 'function') + src = (options as any).url(service, videoId, options); + else if (typeof (options as any).videoUrl === 'function') + src = (options as any).videoUrl(service, videoId, options); return [ 'div', { @@ -69,7 +76,7 @@ export const VideoSpecs: ExtensionAuto = (builder, opts) => { type: 'text/html', width: String(options[service as VideoService].width), height: String(options[service as VideoService].height), - src: options.videoUrl(service, videoId, options), + src: src, frameborder: '0', webkitallowfullscreen: '', mozallowfullscreen: '',