feat: added support to embed aparat

This commit is contained in:
Jannat Patel
2024-06-21 11:38:30 +05:30
parent b5a904354a
commit f783b981e5
2 changed files with 2 additions and 15 deletions

View File

@@ -167,6 +167,7 @@ export function getEditorTools() {
youtube: true,
vimeo: true,
codepen: true,
aparat: true,
slides: {
regex: /https:\/\/docs\.google\.com\/presentation\/d\/e\/([A-Za-z0-9_-]+)\/pub/,
embedUrl:
@@ -179,20 +180,6 @@ export function getEditorTools() {
}
}
function getVideoBlockHtml(medium) {
let regex
if (medium === 'youtube') {
regex =
/(?:https?:\/\/)?(?:www\.)?(?:(?:youtu\.be\/)|(?:youtube\.com)\/(?:v\/|u\/\w\/|embed\/|watch))(?:(?:\?v=)?([^#&?=]*))?((?:[?&]\w*=\w*)*)/
regex.exec(url)?.slice(1)
}
const wrapper = document.createElement('div')
const app = createApp(VideoBlock, {
file: file.file_url,
})
app.mount(wrapper)
}
export function getTimezones() {
return [
'Pacific/Midway',