Class: LiveVideo
Represents a video that's currently live, usually returned from client.getVideo()
Hierarchy
↳
LiveVideo
Implements
LiveVideoProperties
Properties
captions
• captions: null | VideoCaptions
Captions helper class of this video (if caption exists in this video)
Inherited from
channel
• channel: BaseChannel
The channel that uploaded this video
Inherited from
chatContinuation
• chatContinuation: string
Current continuation token to load next chat
client
• client: Client
An instance of Client
Inherited from
description
• description: string
The description of this video
Inherited from
id
• id: string
Inherited from
isLiveContent
• isLiveContent: boolean
Whether this video is a live content or not
Inherited from
likeCount
• likeCount: null | number
How many like does this video have, null if the like count is hidden
Inherited from
related
• related: VideoRelated
Continuable of videos / playlists related to this video
Inherited from
tags
• tags: string[]
The tags of this video
Inherited from
thumbnails
• thumbnails: Thumbnails
Thumbnails of the video with different sizes
Inherited from
title
• title: string
The title of this video
Inherited from
uploadDate
• uploadDate: string
The date this video is uploaded at
Inherited from
viewCount
• viewCount: null | number
How many view does this video have, null if the view count is hidden
Inherited from
watchingCount
• watchingCount: number
Number of people who's watching the live stream right now
Accessors
upNext
• get upNext(): VideoCompact | PlaylistCompact
Video / playlist to play next after this video, alias to
video.related.items[0]
Returns
VideoCompact | PlaylistCompact
Methods
emit
▸ emit<T>(event, ...args): boolean
Type parameters
| Name | Type |
|---|---|
T | extends "chat" |
Parameters
| Name | Type |
|---|---|
event | T |
...args | Parameters<LiveVideoEvents[T]> |
Returns
boolean
on
▸ on<T>(event, listener): AsyncIterableIterator<any>
Type parameters
| Name | Type |
|---|---|
T | extends "chat" |
Parameters
| Name | Type |
|---|---|
event | T |
listener | LiveVideoEvents[T] |
Returns
AsyncIterableIterator<any>
playChat
▸ playChat(delay?): void
Start polling for get live chat request
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
delay | number | 0 | chat delay in millisecond |
Returns
void
stopChat
▸ stopChat(): void
Stop request polling for live chat
Returns
void