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

Question: RTCSessionDescription and RTCIceCandidate undefined server-side #689

Open
magnusros opened this issue Apr 1, 2021 · 0 comments

Comments

@magnusros
Copy link

magnusros commented Apr 1, 2021

Building node.js server where I need to setup peerConnection between node-js (server) and device (with webrtc support).
The plan is to also use simple-peer library.
According to library their is support for node: https://www.npmjs.com/package/simple-peer#in-node
Is it possible to run this server-side? or required to running in the browser context?

var Peer = require('simple-peer')
var wrtc = require('wrtc')

var peer = new Peer({ initiator: true, wrtc: wrtc })

RTCSessionDescription and RTCIceCandidate functions are undefined. Console.log of wrtc:

`wrtc:  <ref *1> {
  setDOMException: [Function (anonymous)],
  getDisplayMedia: [Function (anonymous)],
  getUserMedia: [Function (anonymous)],
  rgbaToI420: [Function (anonymous)],
  i420ToRgba: [Function (anonymous)],
  LegacyStatsReport: [Circular *1],
  MediaStream: [Function: MediaStream],
  MediaStreamTrack: [Function: MediaStreamTrack],
  RTCPeerConnectionFactory: [Function: RTCPeerConnectionFactory],
  RTCAudioSink: [Function: RTCAudioSink],
  RTCAudioSource: [Function: RTCAudioSource],
  RTCDataChannel: [Function: RTCDataChannel],
  RTCIceTransport: [Function: RTCIceTransport],
  RTCDtlsTransport: [Function: RTCDtlsTransport],
  RTCPeerConnection: [Function: RTCPeerConnection],
  RTCRtpReceiver: [Function: RTCRtpReceiver],
  RTCRtpSender: [Function: RTCRtpSender],
  RTCRtpTransceiver: [Function: RTCRtpTransceiver],
  RTCSctpTransport: [Function: RTCSctpTransport],
  RTCStatsResponse: [Function: RTCStatsResponse],
  RTCVideoSink: [Function: RTCVideoSink],
  RTCVideoSource: [Function: RTCVideoSource]
}`

Since RTCSessionDescription is undefined, I get following error when running latest version (9.10.0) of simple-peer:
ypeError: this._wrtc.RTCSessionDescription is not a constructor
Is this intended behaviour?
Please se peers/peerjs#103 for more info

@magnusros magnusros changed the title RTCSessionDescription and RTCIceCandidate missing RTCSessionDescription and RTCIceCandidate undefined (missing) Apr 7, 2021
@magnusros magnusros changed the title RTCSessionDescription and RTCIceCandidate undefined (missing) RTCSessionDescription and RTCIceCandidate undefined Apr 8, 2021
@magnusros magnusros changed the title RTCSessionDescription and RTCIceCandidate undefined RTCSessionDescription and RTCIceCandidate undefined server-side Apr 12, 2021
@magnusros magnusros changed the title RTCSessionDescription and RTCIceCandidate undefined server-side Question: RTCSessionDescription and RTCIceCandidate undefined server-side Apr 12, 2021
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

1 participant