UNPKG

@ormoshe/js-video-url-parser

Version:

A parser to extract provider, video id, starttime and others from YouTube, Vimeo, ... urls

16 lines (11 loc) 412 B
import { VideoInfo } from '../urlParser'; export interface YouTubeUrlParameters { start?: number; [key: string]: any; } export type YouTubeMediaTypes = 'video' | 'playlist' | 'share' | 'channel'; export interface YouTubeVideoInfo extends VideoInfo<YouTubeUrlParameters, YouTubeMediaTypes> { provider: 'youtube'; list?: string; } export type YouTubeParseResult = YouTubeVideoInfo | undefined;