feat: add YouTube embedded player (#460)
Co-authored-by: Daniel Vergara <daniel.omar.vergara@gmail.com>
This commit is contained in:
@@ -7,7 +7,8 @@ import {
|
||||
LN_INVOICE_REGEX,
|
||||
URL_REGEX,
|
||||
MEDIA_REGEX,
|
||||
WS_URL_REGEX
|
||||
WS_URL_REGEX,
|
||||
YOUTUBE_URL_REGEX
|
||||
} from '@/constants'
|
||||
|
||||
export type TEmbeddedNodeType =
|
||||
@@ -23,6 +24,7 @@ export type TEmbeddedNodeType =
|
||||
| 'url'
|
||||
| 'emoji'
|
||||
| 'invoice'
|
||||
| 'youtube'
|
||||
|
||||
export type TEmbeddedNode =
|
||||
| {
|
||||
@@ -76,6 +78,11 @@ export const EmbeddedNormalUrlParser: TContentParser = {
|
||||
regex: URL_REGEX
|
||||
}
|
||||
|
||||
export const EmbeddedYoutubeParser: TContentParser = {
|
||||
type: 'youtube',
|
||||
regex: YOUTUBE_URL_REGEX
|
||||
}
|
||||
|
||||
export const EmbeddedEmojiParser: TContentParser = {
|
||||
type: 'emoji',
|
||||
regex: EMOJI_SHORT_CODE_REGEX
|
||||
|
||||
Reference in New Issue
Block a user