A container for valid/parsed video params.

If you have an instance of VideoParams, then you can trust that it's valid, and you can always produce a PrivatePlayer link from it

The purpose is to co-locate all processing of search params/pathnames for easier security auditing/testing

const privateUrl = VideoParams.fromHref("https://example.com/foo/bar?v=123&t=21")?.toPrivatePlayerUrl()
^^^^ <- this is now null, or a string if it was valid

Constructors

Properties

id: string
time: undefined | null | string
validTimestamp: RegExp = ...
validVideoId: RegExp = ...

Methods