meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.13k stars 2.47k forks source link

[0.x] janus-gateway(v0.2.3) not working in react native with polyfill's #3117

Closed prashantkhatal closed 1 year ago

prashantkhatal commented 1 year ago

What version of Janus is this happening on? v0.2.3 janus-gateway (using npm i janus-gateway) as client

Have you tested a more recent version of Janus too? no other stable versions

Was this working before? not sure

Is there a gdb or libasan trace of the issue? I am using it in react native. In janus.nojquery.js, token is not encoded resulting to 400 while long pulling. Also unable to use it as module(ie. no default exported Janus from it). video room plugin is not working.

Additional context Using following as polyfill


window.RTCPeerConnection = RTCPeerConnection;
window.RTCRtpSender = RTCRtpSender;
window.MediaStreamTrack = MediaStreamTrack;
window.MediaStream = MediaStream;
window.RTCSessionDescription = RTCSessionDescription;
window.addEventListener = () => {};
window.adapter = adapter;

navigator.mediaDevices = mediaDevices;
navigator.getUserMedia = () => {};
lminiero commented 1 year ago

I'm sorry but 0.2.3 is five years old, so we won't consider this issue. Please use a recent version of the library instead.

prashantkhatal commented 1 year ago

I'm sorry but 0.2.3 is five years old, so we won't consider this issue. Please use a recent version of the library instead.

can you please point which version? Whenever i use npm i janus-gateway it installs 0.2.3.

Thanks

lminiero commented 1 year ago

Don't use the version from npm, that's not from us. Use the version in this repo, the documentation has info in case you need to use it as a module: https://janus.conf.meetecho.com/docs/js-modules.html