Options
All
  • Public
  • Public/Protected
  • All
Menu

YouTube Stream Class for playing audio from normal videos.

Hierarchy

  • Stream

Index

Constructors

constructor

Properties

Private bytes_count

bytes_count: number

Used to calculate no of bytes data that we have recieved

Private content_length

content_length: number

Total length of audio file in bytes

Private per_sec_bytes

per_sec_bytes: number

Calculate per second bytes by using contentLength (Total bytes) / Duration (in seconds)

Private proxy

proxy: undefined | ProxyOptions[]

Proxy config given by user. [ Used only for retrying purposes only. ]

Private quality

quality: number

Quality given by user. [ Used only for retrying purposes only. ]

Private request

request: null | IncomingMessage

Incoming message that we recieve.

Storing this is essential. This helps to destroy the TCP connection completely if you stopped player in between the stream

stream

Readable Stream through which data passes

Private timer

Timer for looping data every 265 seconds.

type

Type of audio data that we recieved from normal youtube url.

Private url

url: string

Audio Endpoint Format Url to get data from.

Private video_url

video_url: string

YouTube video url. [ Used only for retrying purposes only. ]

Methods

Private cleanup

  • cleanup(): void

Private loop

pause

  • pause(): void

resume

  • resume(): void

Private retry

Generated using TypeDoc