googlevideo / exports/utils / isGoogleVideoURL
Function: isGoogleVideoURL()
isGoogleVideoURL(
url
):boolean
Defined in: codeberg/googlevideo/src/utils/shared.ts:23
Determines if a given URL is a Google video URL, specifically for YouTube or SABR-related content.
Parameters
url
string
The URL to check.
The function checks the following conditions:
- If the URL starts with the
sabr://
protocol, it is considered a Google video URL. - If the URL ends with
/videoplayback
, it parses the query parameters to check for specific keys (source=youtube
,sabr
,lsig
, orexpire
) that indicate a Google video URL. - If the URL contains
/videoplayback/
(e.g., for live or post-live content), it checks the path segments for specific keywords (videoplayback
,sabr
,lsig
, orexpire
).
Returns
boolean