feat: add YouTube embedded player (#460)
Co-authored-by: Daniel Vergara <daniel.omar.vergara@gmail.com>
This commit is contained in:
parent
830362b941
commit
5a28233856
8 changed files with 191 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue