Members

DiskStorage

Writing blobs into IndexedDB.

DiskStorage is a standalone object used by RecordRTC to store recorded blobs in IndexedDB storage.

Properties:
Name Type Description
init function

This method must be called once to initialize IndexedDB ObjectStore. Though, it is auto-used internally.

Fetch function

This method fetches stored blobs from IndexedDB.

Store function

This method stores blobs in IndexedDB.

onError function

This function is invoked for any known/unknown error.

dataStoreName string

Name of the ObjectStore created in IndexedDB storage.

Author:
License:
Source:
See:
Example
DiskStorage.Store({
    audioBlob: yourAudioBlob,
    videoBlob: yourVideoBlob,
    gifBlob  : yourGifBlob
});
DiskStorage.Fetch(function(dataURL, type) {
    if(type === 'audioBlob') { }
    if(type === 'videoBlob') { }
    if(type === 'gifBlob')   { }
});
// DiskStorage.dataStoreName = 'recordRTC';
// DiskStorage.onError = function(error) { };

Storage

Storage is a standalone object used by RecordRTC to store reusable objects e.g.

Storage is a standalone object used by RecordRTC to store reusable objects e.g. "new AudioContext".

Properties:
Name Type Description
AudioContext webkitAudioContext

Keeps a reference to AudioContext object.

Author:
License:
Source:
See:
Example
Storage.AudioContext === webkitAudioContext

Methods

bytesToSize(bytes) → {string}

Return human-readable file size.

Return human-readable file size.

Parameters:
Name Type Description
bytes number

Pass bytes and get formatted string.

Source:
See:
Returns:
  • formatted string
Type
string
Example
bytesToSize(1024*1024*5) === '5 GB'

getSeekableBlob(file, callback)

Parameters:
Name Type Description
file Blob

File or Blob object.

callback function

Callback function.

Source:
See:
Example
getSeekableBlob(blob or file, callback);

invokeSaveAsDialog(file, fileName)

Parameters:
Name Type Description
file Blob

File or Blob object. This parameter is required.

fileName string

Optional file name e.g. "Recorded-Video.webm"

Source:
See:
Example
invokeSaveAsDialog(blob or file, [optional] fileName);

isElectron()

from: https://github.com/cheton/is-electron/blob/master/index.js

.

from: https://github.com/cheton/is-electron/blob/master/index.js

Source: