Members
areRecordScriptsLoaded :boolean
Variable to check if all script used to record are loaded.
Default value: false
Type:
- boolean
- Source:
arrayValue :integer
Frame selected each time the user use the range bar
Type:
- integer
- Source:
audioParts :array
Contains audio parts of recording.
Each time a user set pause to the recording, a blob is written into this
array.
When the user stop the record, all audio are concatenated into one.
At the end of the recording, the array contains at least one element.
Default value: [] (empty)
Type:
- array
- Source:
config :Object
This is the default configuration variable
Type:
- Object
- Source:
cssData :string
The css data used in the replay page (for download)
Type:
- string
- Source:
downButton :Button
Download Button Object
Type:
- Source:
encodingOver :boolean
A flag to detect if encoding is finished.
Avoid downloading archive before the audio recorder has finished
Default value: false.
Type:
- boolean
- Source:
encodingType :string
encoding type is format encoding for sound.
Default value: "mp3";
Type:
- string
- Source:
eventBlob :Blob
A blob of all events, for downloading
Type:
- Blob
- Source:
events :array
Rrweb events array.
Default value: [] (empty)
Type:
- array
- Source:
gifLoadingButton :Object
The object of the gif button. This button is not clickable,
it is just showing a running gif.
Type:
- Object
- Source:
interval :function
interval to print logs
Default value: every 10 seconds
Type:
- function
- Source:
isActive :Object
Rrweb recorder.
Allow us to stop it when needed
Type:
- Object
- Source:
isDragged :boolean
This variable is used to see if the button is dragged or clicked.
Default value: false;
Type:
- boolean
- Source:
isMenuOpen :boolean
This variable is used to see if the menu is open or closed.
Default value: false;
Type:
- boolean
- Source:
isPauseButtonCreated :boolean
Check if pause Button has been created
Default value: false
Type:
- boolean
- Source:
jsData :string
The js script in the replay page (for download)
Type:
- string
- Source:
mainDiv :Object
Main div Object
Type:
- Object
- Source:
pauseButton :Button
Pause Button Object
Type:
- Source:
pauseReplayer :Object
Replayer created during pause, to be able to recreate frames in real time
Default value: null
Type:
- Object
- Source:
recordButton :Button
Record Button Object
Type:
- Source:
recorder :Object
Recorder Object
Type:
- Object
- Source:
recorderState :string
Recorder status. Can be "PLAYING", "PAUSED" or "STOPPED"
Default value: null;
Type:
- string
- Source:
recStream
Audio Stream.
Allow us to stop it when needed
- Source:
sliderBar :Object
Sliderbar range bar Object
Type:
- Object
- Source:
soundBlob :Blob
A blob of mp3 recording, for downloading
Type:
- Blob
- Source:
textData :string
The replay page text when downloading
Type:
- string
- Source:
textTime :Object
Range bar text indicator
Type:
- Object
- Source:
totalTime :string
Time of the record.
Used when the range bar is displayed
Type:
- string
- Source:
Methods
addslashes(str)
This function escape all special character that could break JSON parsing
This function is used when downloading record
Parameters:
Name | Type | Description |
---|---|---|
str |
string | String given containing all the events. |
- Source:
Returns:
Return a well escaped string.
buttonPosition(button)
Set the button position according to user config
Parameters:
Name | Type | Description |
---|---|---|
button |
Object | The object to apply the style to |
- Source:
changeMainDivSize(newWidthInPx, newHeightInPx)
Change the size of the mainDiv
Parameters:
Name | Type | Description |
---|---|---|
newWidthInPx |
integer | The will that will be added to the current width |
newHeightInPx |
integer | The new height that will be added to the current height |
computeTimeBetweenTwoFrames(firstFrame, secondFrame) → {string}
Compute time in minute and second between two rrweb events.
Compute doing firstFrame - secondFrame
Parameters:
Name | Type | Description |
---|---|---|
firstFrame |
rrweb-event | The first frame |
secondFrame |
rrweb-event | The second frame |
Returns:
String in the format "00:00"
- Type
- string
createBaseDiv(mainDivId) → {Object}
Create base div containing recorder, pause, resume, stop and downloader
buttons.
Parameters:
Name | Type | Description |
---|---|---|
mainDivId |
string | Specify the div id |
- Source:
Returns:
Return the object of the div, allowing to be modifiable
- Type
- Object
downRecord()
This function launch the download of the record.
It also put files in the zip for download
- Source:
launchRecord()
Launch the audio and screen record
- Source:
loadCss(path)
Load CSS file from path given
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The path for the css file to load |
- Source:
loadJS(src, cb)
Load different JS library and callback when fully loaded
Parameters:
Name | Type | Description |
---|---|---|
src |
string | The path of the script (can be relative or absolute) |
cb |
function | Callback, function to launch when loaded |
- Source:
logger(String)
Check if log has been activated and print stringLog if so.
Parameters:
Name | Type | Description |
---|---|---|
String |
string | to print if log is activated. |
makeElementMovable(element)
The goal of this function is to make an element movable with mouse
Parameters:
Name | Type | Description |
---|---|---|
element |
string | The element id |
- Source:
millisToMinutesAndSeconds(millis)
Turn milliseconds to minutes and seconds in the following format:
'00:00'
Parameters:
Name | Type | Description |
---|---|---|
millis |
integer | number of millis to convert |
openMenu()
Increase size of the mainDiv and make visible pause Button
- Source:
pauseRecord()
When the record is in pause make appear the range bar
- Source:
readTextFile()
This function read a server-local text file
(does not work in localhost due to CORS request not being HTTPS)
- Source:
resumeRecord()
Resume the record
This function is very similar to launchRecord, excepted we do not
need to check for permissions, they should be granted
- Source:
saveAs(data, filename)
Download the record automatically
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | raw data of the zip file |
filename |
string | The name we want to give to the downloaded filename |
- Source:
stopRecord()
This function stop the record of the screen and audio.
- Source: