mirror of
https://github.com/LuanRT/googlevideo.git
synced 2026-06-30 09:55:15 +00:00
chore: update docs
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
|
||||
> **isGoogleVideoURL**(`url`): `boolean`
|
||||
|
||||
Defined in: [src/utils/shared.ts:11](https://github.com/LuanRT/googlevideo/blob/cc730b4dbadc5ae882d6aa28d716e442943577fa/src/utils/shared.ts#L11)
|
||||
Defined in: [src/utils/shared.ts:23](https://github.com/LuanRT/googlevideo/blob/5b84100979befab767d819a9606dde964d469341/src/utils/shared.ts#L23)
|
||||
|
||||
Determines if a given URL is a Google video URL, specifically for YouTube or SABR-related content.
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -12,6 +14,15 @@ Defined in: [src/utils/shared.ts:11](https://github.com/LuanRT/googlevideo/blob/
|
||||
|
||||
`string`
|
||||
|
||||
The URL to check.
|
||||
|
||||
The function checks the following conditions:
|
||||
1. If the URL starts with the `sabr://` protocol, it is considered a Google video URL.
|
||||
2. If the URL ends with `/videoplayback`, it parses the query parameters to check for specific keys
|
||||
(`source=youtube`, `sabr`, `lsig`, or `expire`) that indicate a Google video URL.
|
||||
3. If the URL contains `/videoplayback/` (e.g., for live or post-live content), it checks the path
|
||||
segments for specific keywords (`videoplayback`, `sabr`, `lsig`, or `expire`).
|
||||
|
||||
## Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
Reference in New Issue
Block a user