Class: Remon

Remon()

Most important class for using RemoteMonster API. It can be use to P2P communication and broadcast. You can receive callback events from listener. One Remon object processes only one stream. If you want to handle multiple communication channels or broadcast channels, you must create and use multiple Remon objects.

Constructor

new Remon()

create Remon object with config object and listener object.

create Remon object with config object and listener object. example: var v = new Remon({config: rtcConfig, listener: rtcListener});

Methods

(async) captureScreen()

Capture the screen and use it as the source of local media.

Capture the screen and use it as the source of local media

(async) close()

close all Remon's resources.

close all Remon's resources

(async) connectCall()

Create P2P channel, if there is no P2P channel with the id.

Create P2P channel, if there is no P2P channel with the id. Join the P2P channel, if there is P2P channel with the id. example: remon.connectCall("roomname1");

(async) connectChannel()

Create P2P channel, if there is no P2P channel with the id.

Create P2P channel, if there is no P2P channel with the id. Join the P2P channel, if there is P2P channel with the id. example: remon.connectChannel("roomname1");

(async) createCast((string))

Create a broadcast room with a room id.

Create a broadcast room with a room id

Parameters:
Name Type Description
(string)

roomname id of broadcast room. If this parameter is missing, an arbitrary room id is sent via the onCreateChannel event.

(async) createRoom(roomid)

Create a conference call room with a room id.

Create a conference call room with a room id

Parameters:
Name Type Description
roomid

(async) fetchCalls(id)

Returns a list of currently waiting calls.

Returns a list of currently waiting calls.

Parameters:
Name Type Description
id *

(async) fetchCasts()

Returns a list of currently being broadcast .

Returns a list of currently being broadcast .

getChannelId()

get channel id.

get channel id

getHealth()

retrieve current stream health information.

retrieve current stream health information

getState()

retrieve current remon state information.

retrieve current remon state information

getVersion()

retrieve current sdk version.

retrieve current sdk version

(async) joinCast((string))

Join a room by room id.

Join a room by room id.

Parameters:
Name Type Description
(string)

room id

muteLocalAudio(bool)

mute local audio and mic stream.

mute local audio and mic stream

Parameters:
Name Type Description
bool bool

muteRemoteAudio(bool)

mute remote audio stream.

mute remote audio stream

Parameters:
Name Type Description
bool *

pauseLocalVideo((bool))

mute local video.

mute local video

Parameters:
Name Type Description
(bool)

pauseRemoteVideo((bool))

mute remote video.

mute remote video

Parameters:
Name Type Description
(bool)

bool

reduceVideoQuality()

Reduce current video quality as 1 step.

Reduce current video quality as 1 step

sendMessage((string))

It's only function for P2P communication.

It's only function for P2P communication. send message to peer

Parameters:
Name Type Description
(string)

userMessage message to peer

setAudioDevice(micId)

change audio input.

change audio input

Parameters:
Name Type Description
micId string

setVideoDevice(cameraId)

change Video input.

change Video input

Parameters:
Name Type Description
cameraId

string

setVideoQuality(quality)

Set video quality between HIGH, MEDIUM, LOW.

Set video quality between HIGH, MEDIUM, LOW

Parameters:
Name Type Description
quality *

stopCaptureScreen()

Stop the captureScreen.

Stop the captureScreen

switchCamera()

switch camera with deviceId.

switch camera with deviceId