feat: Embedding for CloudflareStream

This commit is contained in:
safe user
2025-04-24 07:01:55 +00:00
parent befa3d7a6d
commit badaa33ddb
2 changed files with 3 additions and 2 deletions

View File

@@ -260,7 +260,8 @@ export function getEditorTools() {
},
cloudflareStream: {
regex: /https:\/\/customer-[a-z0-9]+\.cloudflarestream\.com\/([a-f0-9]{32})\/watch/,
embedUrl: 'https://iframe.videodelivery.net/<%= remote_id %>',
embedUrl:
'https://iframe.videodelivery.net/<%= remote_id %>',
html: `<iframe style="width:100%; height: ${
window.innerWidth < 640 ? '15rem' : '30rem'
};" frameborder="0" allowfullscreen></iframe>`,

View File

@@ -181,7 +181,7 @@ def get_lesson_icon(body, content):
if block.get("type") == "embed" and block.get("data").get("service") in [
"youtube",
"vimeo",
"cloudflareStream"
"cloudflareStream",
]:
return "icon-youtube"