I’ve got mediasoup server and browser client working well, but I’m trying to create a node client to broadcast from.
I’m sure I have python set up correctly, but after creating the worker successfully, attempting to create any kind of stream with worker.getUserMedia fails. I’m trying this on a mac at the moment.
const worker = await createWorker({
logLevel: 'warn',
});
console.log("worker", worker)
const stream = await worker.getUserMedia({
video: true,
});
I can log the worker and it looks normal, but I get the following error when it tries to get the stream:
InvalidStateError: Channel closed
at Object.close (.../mediasoup-client-aiortc/lib/Channel.js:150:29)
at Channel.close (.../mediasoup-client-aiortc/lib/Channel.js:90:18)
at Worker.close (.../mediasoup-client-aiortc/lib/Worker.js:167:23)
at ChildProcess.<anonymous> (.../mediasoup-client-aiortc/lib/Worker.js:80:18)
at ChildProcess.emit (events.js:314:20)
at ChildProcess.EventEmitter.emit (domain.js:486:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
I expect it’s something basic like permissions/devices on mac, and will try Linux when I can, but I’m not sure how to proceed from here at the moment - would be grateful for any advice.