new VideoPlayer( config )

Description

A class used to download a video.

Parameters
Name Type Description
config VideoPlayerConfig
Details

Members


<static, readonly> list :Array.<VideoPlayer>

Description

The list of VideoPlayer

Details
Array.<VideoPlayer>

<readonly> name :string

Description

The name of the videoPlayer

Details
string

<readonly> isNatif :boolean

Description

If true, the VideoPlayer wront be available for edit

Details
boolean

prefix :Array.<string>

Description

The prefix(s) for matching the url

Details
Array.<string>

Videoplayer#getPlayer, Videoplayer#hasPrefix


downloadable :boolean

Description

Tell if the server can download

Details
boolean

autoDownload :boolean

Description

Tell if the url used for downloading is an url in Episode.links

Details
boolean

<readonly> id

Description

The unique id of the videoPlayer

Details

Methods


toPublic() → {PublicVideoPlayer}

Description

Return the public information of the VideoPlayer (= the informations to give to the client)

Returns
Details

<protected> _dispatchOnComplete( emitter, recDownloadData )

Description

Fire the event "complete" on the emitter

Parameters
Name Type Description
emitter event.EventEmitter
recDownloadData ReqDownloadData
Details

<protected> _dispatchOnProgress( emitter, recDownloadData )

Description

Fire the event "progress" on the emitter

Parameters
Name Type Description
emitter event.EventEmitter
recDownloadData ReqDownloadData
Details

<protected> _dispatchOnError( emitter, err )

Description

Fire the event "error" on the emitter

Parameters
Name Type Description
emitter event.EventEmitter
err string
Fires
Details

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

Description

Download the video using the given link (async)

Parameters
Name Type Description
downloadUrl string
format object

unused

fileName string
Returns
Details

hasPrefix( url ) → {boolean}

Description

Compare the url with the prefix and return true if the url match a prefix in the prefix list

Parameters
Name Type Description
url string
Returns

Return true if the url match a prefix in the prefix list

Details

Videoplayer.prefix


<static> getPlayer( url ) → {VideoPlayer}

Description

Return the first Videoplayer with its prefix matching the url

Parameters
Name Type Description
url string
Returns
Details

Videoplayer.prefix


<static> getVideoPlayerById( id ) → {VideoPlayer}

Description

Return the video player corrisponding

Parameters
Name Type Description
id number
Returns
Details