Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkfkan committed Jul 10, 2024
1 parent 84f4407 commit 2178f9c
Show file tree
Hide file tree
Showing 28 changed files with 1,999 additions and 1,468 deletions.
1,492 changes: 816 additions & 676 deletions bundle/browser.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions bundle/browser.js.map

Large diffs are not rendered by default.

43 changes: 21 additions & 22 deletions bundle/browser.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions bundle/browser.min.js.map

Large diffs are not rendered by default.

1,379 changes: 743 additions & 636 deletions bundle/node.cjs

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions bundle/node.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"license": "MIT",
"dependencies": {
"event-target-polyfill": "0.0.3",
"jintr": "^1.0.0",
"jintr": "^2.0.0",
"linkedom": "^0.14.12",
"node-fetch": "^2.6.7",
"tslib": "^2.5.0",
Expand Down
13 changes: 6 additions & 7 deletions dist/src/core/Player.d.ts
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;
}
103 changes: 55 additions & 48 deletions dist/src/core/Player.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2178f9c

Please sign in to comment.