mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(embeds): add support to youtube shorts
This commit is contained in:
@@ -74,6 +74,8 @@ const YoutubeEmbed = ({ parsedUrl }: EmbedComponentProps) => {
|
||||
if (!videoId) {
|
||||
if (parsedUrl.host.includes('youtu.be')) {
|
||||
videoId = parsedUrl.pathname.substring(1);
|
||||
} else if (parsedUrl.pathname.includes('/shorts/')) {
|
||||
videoId = parsedUrl.pathname.split('/shorts/')[1];
|
||||
} else if (isInvidious) {
|
||||
if (parsedUrl.pathname.startsWith('/watch')) {
|
||||
videoId = parsedUrl.searchParams.get('v');
|
||||
|
||||
Reference in New Issue
Block a user