이벤트 메시지

이벤트 메시지

다른 참여자들의 입장, 퇴장 등 상태 등 클라이언트에서 서버로 부터 오는 이벤트 메시지들에 대한 설명

이벤트 메시지 알림

index.js
// 이벤트 메시지 알림
knowledgetalk.addEventListener('presence', async event => {
    const { type, ...data } = e.detail;

    console.log('이벤트 타입', type);
    console.log('이벤트 데이터', data);

    // 타입별 분기
    switch(type) {
        case 'join': {
            break;
        }
    }
}

타입별 상세 메시지 예시

type: 'join'

다른 사용자의 입장 알림

  • 타입

type: 'leave'

다른 사용자의 퇴장 알림

  • 타입

type: 'publish'

미디어 서버에서 수신 가능한 사용자들의 영상 알림

publishVideo 호출시 type === 'cam' 으로 분기해 처리

  • 타입

type: 'subscribed'

해당 사용자의 영상에 대한 P2P 연결 완료 알림

cam: true 인 경우 publishP2P 로 부터 송신된 메시지

cam: false 인 경우 screenStart로 부터 송신된 메시지

  • 타입

  • p2p stream 조회 예시

type: 'screen'

화면공유 알림, screenStart 호출시 발생

  • p2p의 경우 subscribed 이벤트와 screen 이벤트가 동시에 발생 "p2p stream 조회 예시" 와 같이 처리한다면 screen에서는 따로 처리하지 않아도 됨

  • group의 경우 publish 이벤트와 screen 이벤트가 동시에 발생하므로 "feeds 사용 예시" 와 같이 처리한다면 screen에서는 따로 처리하지 않아도 됨

  • 타입

type: 'whiteBoard'

화이트보드 알림

  • 타입

type: 'document'

자료공유 알림

  • 타입

type: 'documentShare'

이미지 경로 알림

  • 타입

type: 'shareStop'

공유 중지 알림

  • 타입

type: 'chat'

채팅 메시지 알림

  • 타입

type: 'inform'

커스텀 메시지 수신 알림 정의되지 않은 메시지가 필요 할 경우 사용할 수 있습니다.

  • 타입

type: 'editUserInfo'

사용자 정보 변경 알림

  • 타입

type: 'createGroup'

분반 생성 알림

  • 타입

type: 'kickOut'

강제 퇴장 알림

  • 타입

type: 'talking'

화자 감지 알림

  • 타입

  • 현재 미사용 중 인 메서드

type: 'drawingClassStart'

type: 'drawingShareStart'

type: 'drawingShareStop'

type: 'drawingShareImg'

type: 'drawingClassStop'

Last updated