Skip to main content
Module

x/youtubei/deno.ts>Mixins.MediaInfo

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

Constructors

new
MediaInfo(
actions: Actions,
cpn: string,
)

Properties

readonly
actions: Actions

Actions instance.

readonly
cpn: string

Content Playback Nonce.

Original parsed InnerTube response.

playability_status
player_config: IPlayerConfig
streaming_data

Methods

addToWatchHistory(
client_name?,
client_version?,
replacement?,
): Promise<Response>

Adds video to the watch history.

Selects the format that best matches the given options.

download(options?: DownloadOptions): Promise<ReadableStream<Uint8Array>>

Downloads the video.

getStreamingInfo(url_transformer?: URLTransformer, format_filter?: FormatFilter)

Get a cleaned up representation of the adaptive_formats

getTranscript(): Promise<TranscriptInfo>

Retrieves the video's transcript.

toDash(
url_transformer?: URLTransformer,
format_filter?: FormatFilter,
options?: DashOptions,
): Promise<string>

Generates a DASH manifest from the streaming data.