Members
(constant) defaultOptions :Object
Type:
(constant) errors :Object
Type:
(constant) writeProgressUsage :number
how much of progress should be connected with writing chunks to a hard drive (1 - 100%)
Type:
Methods
checkForLocalFile(fileUrl, callback) → {void}
Parameters:
Name |
Type |
Description |
fileUrl |
string
|
file url |
callback |
function
|
callback to be invoked when check for file has been done |
Returns:
-
Type
-
void
convertStorage(storageKey, items) → {*}
Helper function
Parameters:
Name |
Type |
Description |
storageKey |
string
|
storage key |
items |
object
|
storage items |
Returns:
data to be stored
-
Type
-
*
createBridgeMethods(scope, From) → {void}
the idea is to copy the methods from storage so that they can be triggered from parent object and then propagated back
to the storage object.
for example:
someController.storage.status.setItem(manifestId, someKey, someValue);
someController.storage.downloads.setItem(manifestId, someKey, someValue);
Parameters:
Name |
Type |
Description |
scope |
object
|
parent object where the method "From" object will be bridged to |
From |
object
|
object where the original method was declared |
Returns:
-
Type
-
void
dirList(dir, includeFolders, includeFiles) → {Promise}
Parameters:
Name |
Type |
Description |
dir |
string
|
folder path |
includeFolders |
boolean
|
if folders should be included |
includeFiles |
boolean
|
if files should be included |
Returns:
promise
-
Type
-
Promise
filterDirItem(dir, itemName, includeFolders, includeFiles) → {Promise}
Parameters:
Name |
Type |
Description |
dir |
string
|
folder path |
itemName |
string
|
folder or file name |
includeFolders |
boolean
|
if folders should be included |
includeFiles |
boolean
|
if files should be included |
Returns:
promise
-
Type
-
Promise
Type Definitions
Link
Type:
Properties:
Name |
Type |
Description |
id |
string
|
identifier |
bandwidth |
number
|
bandwidth |
contentType |
string
|
content type [video, audio, text] |
remoteUrl |
string
|
remote url |
localUrl |
string
|
local url |
Link
Type:
Properties:
Name |
Type |
Description |
id |
string
|
identifier |
bandwidth |
number
|
bandwidth |
contentType |
string
|
content type [video, audio, text] |
remoteUrl |
string
|
remote url |
localUrl |
string
|
local url |
manifestObject
Properties:
Name |
Type |
Description |
video |
Object
|
video representations |
audio |
Object
|
audio representations |
text |
Object
|
text representations |
id |
String
|
manifest id |