브라우저의 BroadcastChannel을 사용한 시그널링
소개
이것은 WebRTC 입문자 LT회 #2의 발표 자료입니다.
자기소개
@massie_g/가네코 마사시
WebRTC에 필수적인 시그널링
일대일의 경우
핸즈온 Step2과 같이 수동 시그널링 가능
하지만 여러 사람의 경우는?
시그널링 서버
여러 사람, 싱글룸의 경우
핸즈온 Step3 등

복수인, 복수 룸의 경우(1)

복수인, 복수 룸의 경우(2)
Firebase 및 Milkcocoa과 같은 실시간 통신 서비스를 사용할 수도 있습니다.
※하지만 더 쉽게하고 싶다!
그래서 BroadcastChannel
BroadcastChannel이란?
MDN의 Broadcast Channel API 설명 부터 인용

※BroadcastChannel에 대해서는 ㅎㅎ씨에게 가르쳐 주셨습니다. 정말 고마워요!
BroadcastChannel 사용법
// 接続
let channelName = 'myroom';
let broadcast = new BroadcastChannel(channelName);
// メッセージのハンドリング
broadcast.onmessage = function(evt) {
let messageObject = JSON.parse(evt.data);
// ... メッセージに応じた処理 ...
}
// メッセージの送信
let messageString = JSON.stringify(messageObject);
broadcast.postMessage(messageString );
// 切断
broadcast.close();
데모
BroadcastChannel을 시그널링에 사용하는 경우의 주의
※다른 실시간 메시지 서비스를 사용하는 경우에도 같은 대책이 필요
특정 사용자에게 보내는 메시지

모두에게 보내는 메시지도 있습니다.

참고: 여러 상대에게는 여러 PeerConnection


참고: 여러 상대에게는 개별 SDP

요약
Reference
이 문제에 관하여(브라우저의 BroadcastChannel을 사용한 시그널링), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/massie_g/items/925c12076af669106b40텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)