new YoutubePlayer( config )

Description

A class used to download a youtube video. It also get the video info.

Parameters
Name Type Description
config VideoPlayerConfig
Details

VideoPlayer

Members


<static, readonly> instance

Description

Unique instance of the class

Returns
Details

Methods


download( downloadUrl, format, localFileWithoutExtension ) → {EventEmitter}

Description

Download the youtube video (async)

Parameters
Name Type Description
downloadUrl string

Unused

format ytdl.videoFormat
localFileWithoutExtension string
Returns
Details

getInfo( url ) → {Promise.<ytdl.videoInfo>}

Description

Fetch the informations of the youtube video

Parameters
Name Type Description
url string
Returns
Requires
Details

ytdl#getInfo