feat: Embedding for Bunny Stream

This commit is contained in:
safe user
2025-06-11 06:42:29 +00:00
parent 7fcf6a253d
commit 3f311a45ef
2 changed files with 8 additions and 0 deletions

View File

@@ -197,6 +197,13 @@ export function getEditorTools() {
window.innerWidth < 640 ? '15rem' : '30rem'
};" frameborder="0" allowfullscreen></iframe>`,
},
bunnyStream: {
regex: /https:\/\/(?:iframe\.mediadelivery\.net|video\.bunnycdn\.com)\/play\/([a-zA-Z0-9]+\/[a-zA-Z0-9-]+)/,
embedUrl: 'https://iframe.mediadelivery.net/embed/<%= remote_id %>',
html: `<iframe style="width:100%; height: ${
window.innerWidth < 640 ? '15rem' : '30rem'
};" frameborder="0" allowfullscreen></iframe>`,
},
codepen: true,
aparat: {
regex: /(?:http[s]?:\/\/)?(?:www.)?aparat\.com\/v\/([^\/\?\&]+)\/?/,

View File

@@ -182,6 +182,7 @@ def get_lesson_icon(body, content):
"youtube",
"vimeo",
"cloudflareStream",
"bunnyStream",
]:
return "icon-youtube"