Class: videoMail

videoMail

VideoMail usecase


new videoMail(onEvents, domElements, options)

VideoMail usecase

Parameters:
Name Type Description
onEvents object

Event handlers: onEvents

domElements object

DOM elements: domElements

options object

Available options: options

Returns:

VideoMail actions

Type
Promise
Example
var onEvents = {
    onRecording: () => {
         // Started recording
    },
    onStopped: () => {
         // Stopped recoding
    }
};

var domElements = {
    videomail: document.getElementById('videomail')
};

var options = {
    stream: {
        audioEnabled: true,
        videoEnabled: true,
        aDeviceId: null,
        vDeviceId: null
    },
    account: "******" // Multiple mode
};

usecases.videoMail(onEvents, domElements, options)
    .then(action => {
         // Use Case has been atacched succesfully
         ...
    })
    .catch(cause => {
        // Error attaching the Use Case
        console.log("Error Attach " + cause );
    })

Methods


<inner> closeUsecase()

Close the current UseCase. It's recommended combine with disconnect method

Returns:
Type
nothing
Example
action.closeUsecase();
myVideoApp.disconnect(); // Recommended

<inner> startRecording(recordPrefix, name)

The User sends a request to start recording a Video message

Parameters:
Name Type Description
recordPrefix string

Prefix record

name string

File name

Returns:
Type
nothing
Example
action.startRecording('__default__', 'MyRecordMobile');

<inner> stopRecording()

The User sends a request to stop recording the current Video message

Returns:
Type
nothing
Example
action.stopRecording();

<inner> toggleAudio()

Toggle Audio stream (Mute/Unmute)

Returns:

Is audio muted?

Type
boolean
Example
action.toggleAudio(); // true or false

<inner> toggleVideo()

Toggle Video stream (Mute/Unmute)

Returns:

Is video muted?

Type
boolean
Example
action.toggleVideo(); // true or false