Skip to main content
Module

x/youtubei/deno.ts>Player

A wrapper around YouTube's internal API — reverse engineering InnerTube
Extremely Popular
Go to Latest
class Player
Re-export
import { Player } from "https://deno.land/x/youtubei@v9.3.0-deno/deno.ts";

Represents YouTube's player script. This is required to decipher signatures.

Constructors

new
Player(
signature_timestamp: number,
sig_sc: string,
nsig_sc: string,
player_id: string,
)

Properties

readonly
nsig_sc: string
readonly
sig_sc: string
readonly
sts: number
readonly
url: string

Methods

cache(cache?: ICache): Promise<void>
decipher(
url?: string,
signature_cipher?: string,
cipher?: string,
this_response_nsig_cache?: Map<string, string>,
): string

Static Properties

readonly
LIBRARY_VERSION: number
TAG: string

Static Methods

create(cache: ICache | undefined, fetch?: FetchFunction): Promise<Player>
extractNSigSourceCode(data: string): string
extractSigSourceCode(data: string): string
extractSigTimestamp(data: string): number
fromCache(cache: ICache, player_id: string): Promise<Player | null>
fromSource(
cache: ICache | undefined,
sig_timestamp: number,
sig_sc: string,
nsig_sc: string,
player_id: string,
): Promise<Player>