diff --git a/lib/remote-capture.html b/lib/remote-capture.html
index f048559..89cd076 100644
--- a/lib/remote-capture.html
+++ b/lib/remote-capture.html
@@ -58,13 +58,18 @@ async function handleOffer(clientId, offer, role) {
};
};
- // ICE candidates
+ // ICE candidates — serialize to plain object (WebRTC objects don't survive IPC)
pc.onicecandidate = (event) => {
if (event.candidate) {
window.capture.sendSignaling({
type: 'ice-candidate',
clientId,
- candidate: event.candidate
+ candidate: {
+ candidate: event.candidate.candidate,
+ sdpMid: event.candidate.sdpMid,
+ sdpMLineIndex: event.candidate.sdpMLineIndex,
+ usernameFragment: event.candidate.usernameFragment
+ }
});
}
};
@@ -79,10 +84,11 @@ async function handleOffer(clientId, offer, role) {
const answer = await pc.createAnswer();
await pc.setLocalDescription(answer);
+ // Serialize to plain object (RTCSessionDescription doesn't survive IPC)
window.capture.sendSignaling({
type: 'answer',
clientId,
- answer: pc.localDescription
+ answer: { type: pc.localDescription.type, sdp: pc.localDescription.sdp }
});
window.capture.notifyClientCount(clients.size);
diff --git a/package.json b/package.json
index 7f5c7eb..7075e7d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "multi-hoster-uploader",
- "version": "2.1.3",
+ "version": "2.1.4",
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
"main": "main.js",
"scripts": {