youtubei.js / YTNodes / PlayerMicroformat
Class: PlayerMicroformat
Extends
Constructors
new PlayerMicroformat()
new PlayerMicroformat(
data
):PlayerMicroformat
Parameters
• data: RawNode
Returns
Overrides
Defined in
src/parser/classes/PlayerMicroformat.ts:41
Properties
available_countries
available_countries:
string
[]
Defined in
src/parser/classes/PlayerMicroformat.ts:37
category
category:
string
Defined in
src/parser/classes/PlayerMicroformat.ts:34
channel
channel:
object
id
id:
string
name
name:
string
url
url:
string
Defined in
src/parser/classes/PlayerMicroformat.ts:24
description
description:
Text
Defined in
src/parser/classes/PlayerMicroformat.ts:10
embed?
optional
embed:object
flash_secure_url
flash_secure_url:
string
flash_url
flash_url:
string
height
height:
any
iframe_url
iframe_url:
string
width
width:
any
Defined in
src/parser/classes/PlayerMicroformat.ts:13
end_timestamp
end_timestamp:
null
|Date
Defined in
src/parser/classes/PlayerMicroformat.ts:39
has_ypc_metadata
has_ypc_metadata:
boolean
Defined in
src/parser/classes/PlayerMicroformat.ts:32
is_family_safe
is_family_safe:
boolean
Defined in
src/parser/classes/PlayerMicroformat.ts:30
is_unlisted
is_unlisted:
boolean
Defined in
src/parser/classes/PlayerMicroformat.ts:31
length_seconds
length_seconds:
number
Defined in
src/parser/classes/PlayerMicroformat.ts:22
publish_date
publish_date:
string
Defined in
src/parser/classes/PlayerMicroformat.ts:35
start_timestamp
start_timestamp:
null
|Date
Defined in
src/parser/classes/PlayerMicroformat.ts:38
thumbnails
thumbnails:
Thumbnail
[]
Defined in
src/parser/classes/PlayerMicroformat.ts:11
title
title:
Text
Defined in
src/parser/classes/PlayerMicroformat.ts:9
type
readonly
type:string
Inherited from
Defined in
upload_date
upload_date:
string
Defined in
src/parser/classes/PlayerMicroformat.ts:36
view_count
view_count:
number
Defined in
src/parser/classes/PlayerMicroformat.ts:33
type
static
type:string
='PlayerMicroformat'
Overrides
Defined in
src/parser/classes/PlayerMicroformat.ts:7
Methods
as()
as<
T
,K
>(...types
):InstanceType
<K
[number
]>
Cast to one of the given types.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
Returns
InstanceType
<K
[number
]>
Inherited from
Defined in
hasKey()
hasKey<
T
,R
>(key
):this is PlayerMicroformat & { [k in string]: R }
Check for a key without asserting the type.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
this is PlayerMicroformat & { [k in string]: R }
Whether the node has the key
Inherited from
Defined in
is()
is<
T
,K
>(...types
):this is InstanceType<K[number]>
Check if the node is of the given type.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
The type to check
Returns
this is InstanceType<K[number]>
whether the node is of the given type
Inherited from
Defined in
key()
key<
T
,R
>(key
):Maybe
Assert that the node has the given key and return it.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
The value of the key wrapped in a Maybe
Throws
If the node does not have the key