VideoCall

VideoCall

A VideoCall represents a Call that uses video and audio

Constructor

new VideoCall(api, callReq, remoteContainer, localContaineropt)

Create a VideoCall

Parameters:
Name Type Attributes Description
api Api

api instance

callReq CallRequest

call request information

remoteContainer HTMLElement

html div element where remote participate audio/video elements will be placed

localContainer HTMLElement <optional>

html div element where local participate audio/video elements will be placed

Fires:
  • VideoCall#event:callConnected
  • VideoCall#event:callCompleted
  • VideoCall#event:interlocutorInfo
  • VideoCall#event:localAudioShared
  • VideoCall#event:localVideoShared
  • VideoCall#event:remoteAudioShared
  • VideoCall#event:remoteVideoShared
  • VideoCall#event:localAudioUnshared
  • VideoCall#event:localVideoUnshared
  • VideoCall#event:remoteAudioUnshared
  • VideoCall#event:remoteVideoUnshared
  • VideoCall#event:localAudioEnabled
  • VideoCall#event:localVideoEnabled
  • VideoCall#event:remoteAudioEnabled
  • VideoCall#event:remoteVideoEnabled
  • VideoCall#event:localAudioDisabled
  • VideoCall#event:localVideoDisabled
  • VideoCall#event:remoteAudioDisabled
  • VideoCall#event:remoteVideoDisabled

Extends

Members

type

Overrides:

Returns the type of this object

Methods

(protected) _attachTracks(actor, tracks)

Attaches tracks in the tracks array to the DOM (optionally) and fires proper event

Parameters:
Name Type Description
actor Actors
tracks Array
Fires:
  • VideoCall#event:remoteVideoShared
  • VideoCall#event:remoteAudioShared

(protected) _callCompleted()

Overrides:

Officially completes the call. This should be called by all derived classes

(protected) _callConnected()

Overrides:

This override calls super, but also starts up the local tracks and publishes them when ready

(protected) _detachTracks(actor, tracks)

Detaches tracks in the tracks array from the DOM and fires proper event. Local tracks will also be stopped

Parameters:
Name Type Description
actor Actors
tracks Array
Fires:
  • VideoCall#event:remoteVideoUnshared
  • VideoCall#event:remoteAudioUnshared

disableAudio()

Overrides:

Disables audio. Essentially a mute.

disableVideo()

Disables video. Essentially a pause.

enableAudio(enableopt)

Enables/disables audio. Essentially mute/unmute. With no param true is assumed, but boolean can be used to perform mute

Parameters:
Name Type Attributes Default Description
enable boolean <optional>
true

enableVideo(enableopt)

Enables/disables video. Essentially pause/unpause. With no param true is assumed, but boolean can be used to perform pause

Parameters:
Name Type Attributes Default Description
enable boolean <optional>
true

getInterlocutorInfo() → {InterlocutorInfo}

Overrides:

Used for retrieving interlocutor info after event has already been fired. Will return null if information is not yet ready

Returns:

details on call participant

Type
InterlocutorInfo

hangup() → {Promise.<boolean>}

Overrides:

Hangup the call by calling the proper API method

Returns:
Type
Promise.<boolean>

isVideo() → {boolean}

Overrides:

Returns true if this is a video call, false otherwise

Returns:
Type
boolean

isVoice() → {boolean}

Overrides:

Returns true if this is a voice call, false otherwise

Returns:
Type
boolean

start() → {Promise}

Overrides:

Calls start from the super class, but then performs the video specific start.

Returns:
Type
Promise