@reactor-team/js-sdk 2.9.1 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -72
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -130,7 +130,7 @@ var import_zod = require("zod");
|
|
|
130
130
|
// package.json
|
|
131
131
|
var package_default = {
|
|
132
132
|
name: "@reactor-team/js-sdk",
|
|
133
|
-
version: "2.9.
|
|
133
|
+
version: "2.9.2",
|
|
134
134
|
description: "Reactor JavaScript frontend SDK",
|
|
135
135
|
main: "dist/index.js",
|
|
136
136
|
module: "dist/index.mjs",
|
|
@@ -1414,7 +1414,7 @@ var WebRTCTransportClient = class {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
};
|
|
1416
1416
|
this.peerConnection.onicecandidateerror = (event) => {
|
|
1417
|
-
console.
|
|
1417
|
+
console.debug("[WebRTCTransport] ICE candidate error:", event);
|
|
1418
1418
|
};
|
|
1419
1419
|
this.peerConnection.ondatachannel = (event) => {
|
|
1420
1420
|
console.debug("[WebRTCTransport] Data channel received from remote");
|
|
@@ -2359,12 +2359,11 @@ function ReactorView({
|
|
|
2359
2359
|
videoObjectFit = "contain",
|
|
2360
2360
|
muted = true
|
|
2361
2361
|
}) {
|
|
2362
|
-
const { videoMediaTrack, audioMediaTrack
|
|
2362
|
+
const { videoMediaTrack, audioMediaTrack } = useReactor((state) => {
|
|
2363
2363
|
var _a, _b;
|
|
2364
2364
|
return {
|
|
2365
2365
|
videoMediaTrack: (_a = state.tracks[track]) != null ? _a : null,
|
|
2366
|
-
audioMediaTrack: audioTrack ? (_b = state.tracks[audioTrack]) != null ? _b : null : null
|
|
2367
|
-
status: state.status
|
|
2366
|
+
audioMediaTrack: audioTrack ? (_b = state.tracks[audioTrack]) != null ? _b : null : null
|
|
2368
2367
|
};
|
|
2369
2368
|
});
|
|
2370
2369
|
const videoRef = (0, import_react5.useRef)(null);
|
|
@@ -2403,8 +2402,7 @@ function ReactorView({
|
|
|
2403
2402
|
console.debug("[ReactorView] No tracks or element to attach");
|
|
2404
2403
|
}
|
|
2405
2404
|
}, [mediaStream]);
|
|
2406
|
-
|
|
2407
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
2405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2408
2406
|
"div",
|
|
2409
2407
|
{
|
|
2410
2408
|
style: __spreadValues(__spreadValues(__spreadValues({
|
|
@@ -2412,44 +2410,20 @@ function ReactorView({
|
|
|
2412
2410
|
background: "#000"
|
|
2413
2411
|
}, width && { width }), height && { height }), style),
|
|
2414
2412
|
className,
|
|
2415
|
-
children:
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
),
|
|
2430
|
-
showPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2431
|
-
"div",
|
|
2432
|
-
{
|
|
2433
|
-
style: {
|
|
2434
|
-
position: "absolute",
|
|
2435
|
-
top: 0,
|
|
2436
|
-
left: 0,
|
|
2437
|
-
width: "100%",
|
|
2438
|
-
height: "100%",
|
|
2439
|
-
color: "#fff",
|
|
2440
|
-
display: "flex",
|
|
2441
|
-
alignItems: "center",
|
|
2442
|
-
justifyContent: "center",
|
|
2443
|
-
fontSize: "16px",
|
|
2444
|
-
fontFamily: "monospace",
|
|
2445
|
-
textAlign: "center",
|
|
2446
|
-
padding: "20px",
|
|
2447
|
-
boxSizing: "border-box"
|
|
2448
|
-
},
|
|
2449
|
-
children: status
|
|
2450
|
-
}
|
|
2451
|
-
)
|
|
2452
|
-
]
|
|
2413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2414
|
+
"video",
|
|
2415
|
+
{
|
|
2416
|
+
ref: videoRef,
|
|
2417
|
+
style: {
|
|
2418
|
+
width: "100%",
|
|
2419
|
+
height: "100%",
|
|
2420
|
+
objectFit: videoObjectFit,
|
|
2421
|
+
display: videoMediaTrack ? "block" : "none"
|
|
2422
|
+
},
|
|
2423
|
+
muted,
|
|
2424
|
+
playsInline: true
|
|
2425
|
+
}
|
|
2426
|
+
)
|
|
2453
2427
|
}
|
|
2454
2428
|
);
|
|
2455
2429
|
}
|