mediasoup-client: DOMException: Failed to execute 'structuredClone' on 'Window': #
Hello everyone, how are you? I have an issue; I am using the transport.produce function, trying to pass a track to it. However, when doing so, it returns the error shown in the title. I am using Linux, and thus, I use Chromium. But if I switch to Firefox or Google Chrome, I encounter this error: ‘DOMException: Proxy object could not be cloned.’
This is the line of my code that triggers the error.
const producer = await transport.produce({ track });
I pass a track, and I believe there should not be any issues since I am passing a MediaStreamTrack. Nevertheless, I encounter the error. Additionally, I would like to mention that the last version I used was 3.6.89, and it worked fine. However, after updating to version 3.7.2, I am experiencing this problem.
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 1
- Comments: 19 (10 by maintainers)
If anyone has the same problem using Vue, don’t use ref with mediasoup-client as it will use proxies for every property of a class (ex new Device()). Instead prefer using computed values if you need to keep reactivity.
I was using mediasoup client in a class and storing this class in a ref.
I cannot ignore it because you shown a log in which close() is being called with a track.