streamingFileMeta.js

Methods

getMeta(fileName)#

Get cached file meta info. Includes following properties: seconds, fullPath, type, mime, fileSize and pricePerByte.
Parameters:
NameTypeDescription
fileNamestringfile name
Source:

initStreamingMeta(mediaPath, config)#

Reads all media files in *mediaPath* and caches their meta information, such has fileSize, media length in seconds, pricePerByte, etc.
Parameters:
NameTypeDescription
mediaPathstringpath to folder where media files are stored.
configobjectincluding *pricePerMinute* or *pricePerMB* property.
Source:
Returns:
Promise indicating if meta information has been read.