Eyevinn / srt-webrtc

29 stars 5 forks source link

API extremly slow and Error on addTrack #10

Open kaischallenberg opened 1 year ago

kaischallenberg commented 1 year ago

Hey,

I'm trying to get your tool to work and I noticed that the connection to the web port is very slow. After trying several times, I also got the following error:

Waiting for SRT source to be connected
Connection Manager listening on http://0.0.0.0:3000
SRT source connected
reading data
Adding media tracks
TypeError: This is not an instance of MediaStreamTrack
    at RTCPeerConnection.addTrack (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/node_modules/wrtc/lib/peerconnection.js:226:19)
    at /home/kai/srt/srt-webrtc/server.js:15:18
    at hookIterator (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/lib/hooks.js:12:10)
    at next (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/lib/hooks.js:25:20)
    at hookRunner (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/lib/hooks.js:27:3)
    at new Connection (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/lib/connection.js:20:5)
    at WebRTCConnectionManager.createConnection (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/lib/connection_manager.js:50:24)
    at Object.<anonymous> (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/lib/connection_manager_routes.js:10:50)
    at preHandlerCallback (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/node_modules/fastify/lib/handleRequest.js:117:30)
    at preValidationCallback (/home/kai/srt/srt-webrtc/node_modules/@eyevinn/webrtc/node_modules/fastify/lib/handleRequest.js:103:5)
^C

Since I only need the video, I removed the AudioTrack in the server.js. The whole thing runs on Linux Debian 11 and Node 18.16.0. All npm packages are up to date.