youtubei.js / Misc / Format
Class: Format
Constructors
new Format()
new Format(
data
,this_response_nsig_cache
?):Format
Parameters
• data: RawNode
• this_response_nsig_cache?: Map
<string
, string
>
Returns
Defined in
src/parser/classes/misc/Format.ts:85
Properties
approx_duration_ms
approx_duration_ms:
number
Defined in
src/parser/classes/misc/Format.ts:58
audio_channels?
optional
audio_channels:number
Defined in
src/parser/classes/misc/Format.ts:60
audio_quality?
optional
audio_quality:string
Defined in
src/parser/classes/misc/Format.ts:57
audio_sample_rate?
optional
audio_sample_rate:number
Defined in
src/parser/classes/misc/Format.ts:59
audio_track?
optional
audio_track:AudioTrack
Defined in
src/parser/classes/misc/Format.ts:72
average_bitrate?
optional
average_bitrate:number
Defined in
src/parser/classes/misc/Format.ts:49
bitrate
bitrate:
number
Defined in
src/parser/classes/misc/Format.ts:50
caption_track?
optional
caption_track:CaptionTrack
Defined in
src/parser/classes/misc/Format.ts:83
cipher?
optional
cipher:string
Defined in
src/parser/classes/misc/Format.ts:71
color_info?
optional
color_info:ColorInfo
Defined in
src/parser/classes/misc/Format.ts:82
content_length?
optional
content_length:number
Defined in
src/parser/classes/misc/Format.ts:42
distinct_params?
optional
distinct_params:string
Defined in
src/parser/classes/misc/Format.ts:65
drm_families?
optional
drm_families:string
[]
Defined in
src/parser/classes/misc/Format.ts:45
drm_track_type?
optional
drm_track_type:string
Defined in
src/parser/classes/misc/Format.ts:64
fair_play_key_uri?
optional
fair_play_key_uri:string
Defined in
src/parser/classes/misc/Format.ts:53
fps?
optional
fps:number
Defined in
src/parser/classes/misc/Format.ts:46
has_audio
has_audio:
boolean
Defined in
src/parser/classes/misc/Format.ts:73
has_text
has_text:
boolean
Defined in
src/parser/classes/misc/Format.ts:75
has_video
has_video:
boolean
Defined in
src/parser/classes/misc/Format.ts:74
height?
optional
height:number
Defined in
src/parser/classes/misc/Format.ts:39
high_replication?
optional
high_replication:boolean
Defined in
src/parser/classes/misc/Format.ts:56
index_range?
optional
index_range:Range
Defined in
src/parser/classes/misc/Format.ts:70
init_range?
optional
init_range:Range
Defined in
src/parser/classes/misc/Format.ts:69
is_auto_dubbed?
optional
is_auto_dubbed:boolean
Defined in
src/parser/classes/misc/Format.ts:78
is_descriptive?
optional
is_descriptive:boolean
Defined in
src/parser/classes/misc/Format.ts:79
is_drc?
optional
is_drc:boolean
Defined in
src/parser/classes/misc/Format.ts:63
is_dubbed?
optional
is_dubbed:boolean
Defined in
src/parser/classes/misc/Format.ts:77
is_original?
optional
is_original:boolean
Defined in
src/parser/classes/misc/Format.ts:81
is_secondary?
optional
is_secondary:boolean
Defined in
src/parser/classes/misc/Format.ts:80
is_type_otf
is_type_otf:
boolean
Defined in
src/parser/classes/misc/Format.ts:68
itag
itag:
number
Defined in
src/parser/classes/misc/Format.ts:36
language?
optional
language:null
|string
Defined in
src/parser/classes/misc/Format.ts:76
last_modified
last_modified:
Date
Defined in
src/parser/classes/misc/Format.ts:40
last_modified_ms
last_modified_ms:
string
Defined in
src/parser/classes/misc/Format.ts:41
loudness_db?
optional
loudness_db:number
Defined in
src/parser/classes/misc/Format.ts:61
max_dvr_duration_sec?
optional
max_dvr_duration_sec:number
Defined in
src/parser/classes/misc/Format.ts:55
mime_type
mime_type:
string
Defined in
src/parser/classes/misc/Format.ts:67
projection_type?
optional
projection_type:ProjectionType
Defined in
src/parser/classes/misc/Format.ts:48
quality?
optional
quality:string
Defined in
src/parser/classes/misc/Format.ts:43
quality_label?
optional
quality_label:string
Defined in
src/parser/classes/misc/Format.ts:47
signature_cipher?
optional
signature_cipher:string
Defined in
src/parser/classes/misc/Format.ts:62
spatial_audio_type?
optional
spatial_audio_type:SpatialAudioType
Defined in
src/parser/classes/misc/Format.ts:51
stereo_layout?
optional
stereo_layout:StereoLayout
Defined in
src/parser/classes/misc/Format.ts:54
target_duration_dec?
optional
target_duration_dec:number
Defined in
src/parser/classes/misc/Format.ts:52
track_absolute_loudness_lkfs?
optional
track_absolute_loudness_lkfs:number
Defined in
src/parser/classes/misc/Format.ts:66
url?
optional
url:string
Defined in
src/parser/classes/misc/Format.ts:37
width?
optional
width:number
Defined in
src/parser/classes/misc/Format.ts:38
xtags?
optional
xtags:string
Defined in
src/parser/classes/misc/Format.ts:44
Methods
decipher()
decipher(
player
?):string
Deciphers the URL using the provided player instance.
Parameters
• player?: Player
An optional instance of the Player class used to decipher the URL.
Returns
string
The deciphered URL as a string. If no player is provided, returns the original URL or an empty string.