SyntaxError: WebRtcEndpoint doesn't accept events of type 'OnIceCandidate'
Kurento 미디어 서버를 이용하여 WebRTC 그룹 화상 통화하는 기능을 만들기 위해 깃허브에 오픈소스로 공개되어 있는 코드를 참고하여 사용하는 중이었다.
https://github.com/chapin666/kurento-group-call-node
GitHub - chapin666/kurento-group-call-node: kurento group call server
kurento group call server. Contribute to chapin666/kurento-group-call-node development by creating an account on GitHub.
github.com
그런데 해당 코드에서는 kurento-client 6.6.0 버전을 사용하여 구현된 코드였고, 이를 최신 버전인 7.0.0으로 사용하기 위해 변경 후 서버를 실행시켜 테스트를 하는 중 에러를 마주치게 되었다.
에러 메시지는 WebRtcEndpoint에서 OnIceCandidate를 지원하지 않는다는 것이었다.
그래서 Kurento release 문서를 찾아본 결과 6.15.0 버전에서 다음과 같은 내용을 확인할 수 있었다.
https://doc-kurento.readthedocs.io/en/latest/project/relnotes/v6_15_0.html
6.15.0 (November 2020) — Kurento 7.0-dev documentation
<!-- "admonition" is the class of Warning messages with the current RTD theme. Obtained by directly checking the HTML sources of an already existing block. --> Warning Kurento is a low-level platform to create WebRTC applications from scratch. You will be
doc-kurento.readthedocs.io
OnIceCandidate 이벤트가 IceCandidateFound 이벤트로 대체되었다는 점을 알 수 있다.
OnIceCandidate 이벤트를 받는 부분을 IceCandidateFound 코드로 대체하면 문제 해결완료!