Home Reference Source
public class | source

Remon

Most important class for using RemoteMonster API. It can be use to P2P communication and broadcast. You can receive callback events from listener.

Constructor Summary

Public Constructor
public

create Remon object with config object and listener object.

Member Summary

Public Members
public

config: *

public

context: *

public

key: *

public

media: *

public
public

uri: *

public

Method Summary

Public Methods
public

switch camera between fore and back

public

close(closeType: *)

close all Remon's resources

public

async connectCall(args: ...*)

public

async connectChannel(args: ...*): *

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

public

async createCast((string): *)

Create a broadcast room

public

async fetchCalls(id: *): *

public

async fetchCasts(): *

public

get channel id

public

getHealth(): *

retrieve current stream health information

public

getState(): *

retrieve current remon state information

public

getVersion(): *

retrieve current sdk version

public

async init()

public

async joinCast((string): *)

Join a room by room id.

public

liveRooms(): *

Retrieve all broadcast rooms information

public

muteLocalAudio(bool: bool)

mute local audio and mic stream

public

muteRemoteAudio(bool: *)

mute remote audio stream

public
public
public

pauseLocalVideo((bool): *)

mute local video

public

pauseRemoteVideo((bool): *)

mute remote video

public

search((string): *): *

search P2P channels by id.

public

sendMessage((string): *)

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

public

setVideoQulity(quility: *)

public

wait(timeout: *): *

Public Constructors

public constructor() source

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

Public Members

public config: * source

public context: * source

public key: * source

public media: * source

public serviceId: * source

public uri: * source

public version: string source

Public Methods

public cameraSwitch() source

switch camera between fore and back

public close(closeType: *) source

close all Remon's resources

Params:

NameTypeAttributeDescription
closeType *

public async connectCall(args: ...*) source

Params:

NameTypeAttributeDescription
args ...*

public async connectChannel(args: ...*): * source

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");

Params:

NameTypeAttributeDescription
args ...*

Return:

*

public async createCast((string): *) source

Create a broadcast room

Params:

NameTypeAttributeDescription
(string) *

roomname name of broadcast room. it is no id but name. You can take a real room id from onCreateChannel event

public async fetchCalls(id: *): * source

Params:

NameTypeAttributeDescription
id *

Return:

*

public async fetchCasts(): * source

Return:

*

public getChannelId(): * source

get channel id

Return:

*

public getHealth(): * source

retrieve current stream health information

Return:

*

public getState(): * source

retrieve current remon state information

Return:

*

public getVersion(): * source

retrieve current sdk version

Return:

*

public async init() source

public async joinCast((string): *) source

Join a room by room id.

Params:

NameTypeAttributeDescription
(string) *

room id

public liveRooms(): * source

Retrieve all broadcast rooms information

Return:

*

public muteLocalAudio(bool: bool) source

mute local audio and mic stream

Params:

NameTypeAttributeDescription
bool bool

public muteRemoteAudio(bool: *) source

mute remote audio stream

Params:

NameTypeAttributeDescription
bool *

public onDisconnectSignalConnection() source

public onReconnectSignalConnection() source

public pauseLocalVideo((bool): *) source

mute local video

Params:

NameTypeAttributeDescription
(bool) *

public pauseRemoteVideo((bool): *) source

mute remote video

Params:

NameTypeAttributeDescription
(bool) *

bool

search P2P channels by id.

Params:

NameTypeAttributeDescription
(string) *

id for search. It can be part of full id

Return:

*

public sendMessage((string): *) source

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

Params:

NameTypeAttributeDescription
(string) *

userMessage message to peer

public setVideoQulity(quility: *) source

Params:

NameTypeAttributeDescription
quility *

public wait(timeout: *): * source

Params:

NameTypeAttributeDescription
timeout *

Return:

*