Options
All
  • Public
  • Public/Protected
  • All
Menu

YouTube Live Stream class for playing audio from Live Stream videos.

Hierarchy

  • LiveStream

Index

Constructors

constructor

  • new LiveStream(dash_url: string, target_interval: number, video_url: string): LiveStream
  • Live Stream Class Constructor

    Parameters

    • dash_url: string

      dash manifest URL

    • target_interval: number

      interval time for fetching dash data again

    • video_url: string

      Live Stream video url.

    Returns LiveStream

Properties

Private base_url

base_url: string

Base URL in dash manifest file.

Private dash_timer

dash_timer: <internal>.Timer

Timer used to update dash url so as to avoid 404 errors after long hours of streaming.

It updates dash_url every 30 minutes.

Private interval

interval: number

Interval to fetch data again to dash url.

Private packet_count

packet_count: number

Sequence count of urls in dash file.

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

Private segments_urls

segments_urls: string[]

Segments of url that we recieve in dash file.

base_url + segment_urls[0] = One complete url for one segment.

stream

Readable Stream through which data passes

Private timer

Timer that creates loop from interval time provided.

type

Type of audio data that we recieved from live stream youtube url.

Private url

url: string

Given Dash URL.

Private video_url

video_url: string

Live Stream Video url.

Methods

Private cleanup

  • cleanup(): void

Private dash_getter

Private dash_updater

pause

  • pause(): void

resume

  • resume(): void

Private start

Generated using TypeDoc