src/RemonEvents.js
/**
* RemonEvents 즉 개발서비스에서 처리할 수 있는 이벤트에는 다음과 같이 있다.<br>
* onInit: RemoteMonster API 서버와 연결이 되었을 때 발생하는 이벤트<br>
* onConnectChannel: 채널에 연결되었을 때 발생하는 이벤트<br>
* onCreateChannel: 채널 생성에 성공하였을 때 발생하는 이벤트<br>
* onComplete: 연결에 성공하였을 때 발생하는 이벤트. 주로 먼저 채널을 만든 쪽에서 발생함<br>
* onAddLocalStream: 로컬 영상이나 음성을 제어가능하게 받을 수 있을 때 발생하는 이벤트<br>
* onAddRemoteStream: 상대편 영상이나 음성을 받을 수 있을 때 발생<br>
* onStateChange: 통신 연결시작부터 종료까지 상태가 변경될 때마다 호출됨<br>
* onDisconnectChannel: 상대편이 통신을 종료하였을 경우 호출<br>
* onMessage: 상대방으로부터 메시지를 수신하였을 경우 호출됨<br>
* onError: 통신 뿐 아니라 모든 과정에서 발생한 오류<br>
*/
const remonEvents = (function RemonEvents() {
const events = [
"onInit",
"onConnectChannel",
"onCreateChannel",
"onComplete",
"onConnect", //for remon 2.0 call interface when create channel is successful
"onDisplayUserMedia",
"onAddLocalStream",
"onAddRemoteStream",
"onStateChange",
"onDisconnectChannel",
"onMessage",
"onError",
"onStat",
"onClose",
"onLog",
"onJoin", // for remon 2.0 cast interface when create and join room is successful
"onCreate" // for remon 2.0 cast interface when create and join room is successful
];
return Object.freeze(events);
})();
export default remonEvents;