-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84f4407
commit 2178f9c
Showing
28 changed files
with
1,999 additions
and
1,468 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import type { ICache } from '../types/Cache.js'; | ||
import type { FetchFunction } from '../types/PlatformShim.js'; | ||
import type { ICache, FetchFunction } from '../types/index.js'; | ||
/** | ||
* Represents YouTube's player script. This is required to decipher signatures. | ||
*/ | ||
export default class Player { | ||
#private; | ||
nsig_sc: string; | ||
sig_sc: string; | ||
sts: number; | ||
player_id: string; | ||
constructor(signature_timestamp: number, sig_sc: string, nsig_sc: string, player_id: string); | ||
static create(cache: ICache | undefined, fetch?: FetchFunction): Promise<Player>; | ||
decipher(url?: string, signature_cipher?: string, cipher?: string): string; | ||
decipher(url?: string, signature_cipher?: string, cipher?: string, this_response_nsig_cache?: Map<string, string>): string; | ||
static fromCache(cache: ICache, player_id: string): Promise<Player | null>; | ||
static fromSource(cache: ICache | undefined, sig_timestamp: number, sig_sc: string, nsig_sc: string, player_id: string): Promise<Player>; | ||
cache(cache?: ICache): Promise<void>; | ||
static extractSigTimestamp(data: string): number; | ||
static extractSigSourceCode(data: string): string; | ||
static extractNSigSourceCode(data: string): string; | ||
get url(): string; | ||
get sts(): number; | ||
get nsig_sc(): string; | ||
get sig_sc(): string; | ||
static get LIBRARY_VERSION(): number; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.