Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: RTCPeerConnection is not defined #288

Open
rockey2020 opened this issue Apr 26, 2024 · 1 comment
Open

ReferenceError: RTCPeerConnection is not defined #288

rockey2020 opened this issue Apr 26, 2024 · 1 comment

Comments

@rockey2020
Copy link

Describe the bug
A clear and concise description of what the bug is.

const channel = geckos({ port: 10086, url: "localhost" });
  channel.onConnect((err) => {
    console.log(err);
  });

Have a question?
Join the discussions instead.

I get this problem when I use client in node.js 21

Geckos.io signaling server is running on port 10086
file:///Users/rockey/WebstormProjects/darwin.node/node_modules/@geckos.io/client/lib/wrtc/peerConnection.js:5
const webRTCPcSupported = RTCPeerConnection || webkitRTCPeerConnection; // eslint-disable-line no-undef
^

ReferenceError: RTCPeerConnection is not defined
at PeerConnection.connect (file:///Users/rockey/WebstormProjects/darwin.node/node_modules/@geckos.io/client/lib/wrtc/peerConnection.js:5:35)
at ClientChannel.onConnect (file:///Users/rockey/WebstormProjects/darwin.node/node_modules/@geckos.io/client/lib/geckos/channel.js:86:52)
at startClient (file:///Users/rockey/WebstormProjects/darwin.node/apps/anynat/src/service/client/index.ts:4:13)
at
at async file:///Users/rockey/WebstormProjects/darwin.node/apps/anynat/src/index.ts:17:5

Node.js v21.7.3

@yandeu
Copy link
Member

yandeu commented May 21, 2024

It looks like node-datachannel does not yet support Node.js v21:
https://github.com/murat-dogan/node-datachannel?tab=readme-ov-file#supported-platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants