Call back events for Remon class
- onInit(token): It is called when connection between client and signal server is connected and authentication is completed. Return value is token by authentication process.
- onCreateChannel(channelId): It's called when you execute connectCall method with channelId and there's no such channel id. Remon will create a room with the channel Id and onCreateChannel method is called.
- onConnectChannel(channelId): It's called when you execute connectCall method with channel ID and there's such channel ID. Remon will connect peers. After this event, signalling with peers will be executed.
- onComplete(): Called when signaling is complete and the stream is well connected. From this time, the video can be transmitted or viewed.
- onDisplayUserMedia(stream): Called when a local stream has been obtained. You can get a local stream from this event.
- onAddLocalStream(stream): Similar to onDisplayUserMedia, but occurs when signaling is complete.
- onAddRemoteStream(stream): Occurs when signaling is complete and a remote stream can be received. You can take a remote stream as an argument.
- onStateChange(state): State is classified into INIT, CONNECT, WAIT, COMPLETE, CLOSE, etc. according to the connection state. This event is called when the state is changed.
- onDisconnectChannel(): Occurs when a connection is terminated by the other side or the network, not by me.
- onMessage(msg): If the other party sent an arbitrary message through the Remon.sendMessage method, You can receive it via this event.
- onError(err): All errors can be received in this event.
- onStat(stat): When communicating or broadcasting, you can check the current quality of the stream every 3 seconds. There are several stat entries, but the easiest way to know the current quality is 'ratings' property.
- onSearch(msg): Event that can check the result when calling search method such as fetchCall or fetchCast.
- onClose(): Occurs when the close command that I explicitly called actually completes.
- onRoomEvent(msg): Occurs when using conference mode. When someone enters or leaves the room, join and leave events occur and you can connect to the user through the join method through the channel information.
- onJoin(): Occurs when the viewer of the broadcast calls the joinCast command, when the command actually completes and can receive the stream.
- onRecordEvent({event,id,size,file}): Several events about the recording process when a client wants to record or record. Among the parameters to receive, event values include stop, upload, error, and uploaded.