UNPKG

@bytelucas/video-link-parser

Version:

Get the YouTube, Vimeo, Vine, VideoPress, TikTok, Microsoft Stream, Loom or Dailymotion video id from a url or embed string.

7 lines (6 loc) 205 B
export default function getVideoId( url: string ): { id: string | undefined; service: 'youtube' | 'vimeo' | 'vine' | 'videopress' | 'microsoftstream' | 'tiktok' | 'dailymotion' | 'loom' | undefined; };