@reactor-team/js-sdk 3.0.0 → 3.0.1
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/README.md +100 -133
- package/dist/index.cjs +103 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +103 -1
- package/dist/index.js.map +1 -1
- package/dist/wasm/reactor_wasm.d.ts +20 -3
- package/dist/wasm/reactor_wasm.js +51 -14
- package/dist/wasm/reactor_wasm_bg.wasm +0 -0
- package/dist/wasm/reactor_wasm_bg.wasm.d.ts +4 -3
- package/package.json +1 -1
|
@@ -317,6 +317,22 @@ export class ReactorClient {
|
|
|
317
317
|
* how a client built before sign-in gets its token.
|
|
318
318
|
*/
|
|
319
319
|
setJwt(jwt?: JwtSource | null): void;
|
|
320
|
+
/**
|
|
321
|
+
* Bound what one sender may spend, in bits per second. `undefined` or a
|
|
322
|
+
* negative value leaves a bound at the browser default.
|
|
323
|
+
*
|
|
324
|
+
* This is the ceiling that actually caps a video encoder. With nothing set,
|
|
325
|
+
* a Chromium-based browser derives a maximum from the frame size alone, and
|
|
326
|
+
* that maximum is 2500 kbps for anything above 960x540 — so 720p and 1080p
|
|
327
|
+
* senders cap at 2.5 Mbps until this raises them.
|
|
328
|
+
*
|
|
329
|
+
* `minBps` is non-standard: Chromium honours it, other engines ignore it.
|
|
330
|
+
*
|
|
331
|
+
* There is deliberately no connection-wide counterpart. The browser exposes
|
|
332
|
+
* no equivalent of libwebrtc's `PeerConnection::SetBitrate`, and a method
|
|
333
|
+
* that quietly did nothing would be worse than its absence.
|
|
334
|
+
*/
|
|
335
|
+
setTrackBitrate(name: string, min_bps?: number | null, max_bps?: number | null): Promise<void>;
|
|
320
336
|
/**
|
|
321
337
|
* `"disconnected"` | `"connecting"` | `"waiting"` | `"ready"`.
|
|
322
338
|
*/
|
|
@@ -377,6 +393,7 @@ export interface InitOutput {
|
|
|
377
393
|
readonly reactorclient_sessionId: (a: number) => [number, number];
|
|
378
394
|
readonly reactorclient_sessionInfo: (a: number) => [number, number, number];
|
|
379
395
|
readonly reactorclient_setJwt: (a: number, b: number) => [number, number];
|
|
396
|
+
readonly reactorclient_setTrackBitrate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
380
397
|
readonly reactorclient_status: (a: number) => any;
|
|
381
398
|
readonly reactorclient_trackMapping: (a: number) => [number, number, number];
|
|
382
399
|
readonly reactorclient_tracks: (a: number) => [number, number, number];
|
|
@@ -384,9 +401,9 @@ export interface InitOutput {
|
|
|
384
401
|
readonly reactorclient_uploadFile: (a: number, b: any, c: number, d: number) => any;
|
|
385
402
|
readonly wasm_bindgen_85f920685b213f97___convert__closures_____invoke___wasm_bindgen_85f920685b213f97___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_85f920685b213f97___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
386
403
|
readonly wasm_bindgen_85f920685b213f97___convert__closures_____invoke___js_sys_17f5e83adf9a2bda___Function_fn_wasm_bindgen_85f920685b213f97___JsValue_____wasm_bindgen_85f920685b213f97___sys__Undefined___js_sys_17f5e83adf9a2bda___Function_fn_wasm_bindgen_85f920685b213f97___JsValue_____wasm_bindgen_85f920685b213f97___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
387
|
-
readonly
|
|
388
|
-
readonly
|
|
389
|
-
readonly
|
|
404
|
+
readonly wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true_: (a: number, b: number, c: any) => void;
|
|
405
|
+
readonly wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__2: (a: number, b: number, c: any) => void;
|
|
406
|
+
readonly wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__3: (a: number, b: number, c: any) => void;
|
|
390
407
|
readonly wasm_bindgen_85f920685b213f97___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
391
408
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
392
409
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -336,6 +336,31 @@ export class ReactorClient {
|
|
|
336
336
|
throw takeFromExternrefTable0(ret[0]);
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* Bound what one sender may spend, in bits per second. `undefined` or a
|
|
341
|
+
* negative value leaves a bound at the browser default.
|
|
342
|
+
*
|
|
343
|
+
* This is the ceiling that actually caps a video encoder. With nothing set,
|
|
344
|
+
* a Chromium-based browser derives a maximum from the frame size alone, and
|
|
345
|
+
* that maximum is 2500 kbps for anything above 960x540 — so 720p and 1080p
|
|
346
|
+
* senders cap at 2.5 Mbps until this raises them.
|
|
347
|
+
*
|
|
348
|
+
* `minBps` is non-standard: Chromium honours it, other engines ignore it.
|
|
349
|
+
*
|
|
350
|
+
* There is deliberately no connection-wide counterpart. The browser exposes
|
|
351
|
+
* no equivalent of libwebrtc's `PeerConnection::SetBitrate`, and a method
|
|
352
|
+
* that quietly did nothing would be worse than its absence.
|
|
353
|
+
* @param {string} name
|
|
354
|
+
* @param {number | null} [min_bps]
|
|
355
|
+
* @param {number | null} [max_bps]
|
|
356
|
+
* @returns {Promise<void>}
|
|
357
|
+
*/
|
|
358
|
+
setTrackBitrate(name, min_bps, max_bps) {
|
|
359
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
360
|
+
const len0 = WASM_VECTOR_LEN;
|
|
361
|
+
const ret = wasm.reactorclient_setTrackBitrate(this.__wbg_ptr, ptr0, len0, isLikeNone(min_bps) ? Number.MAX_SAFE_INTEGER : (min_bps) >> 0, isLikeNone(max_bps) ? Number.MAX_SAFE_INTEGER : (max_bps) >> 0);
|
|
362
|
+
return ret;
|
|
363
|
+
}
|
|
339
364
|
/**
|
|
340
365
|
* `"disconnected"` | `"connecting"` | `"waiting"` | `"ready"`.
|
|
341
366
|
* @returns {ReactorStatus}
|
|
@@ -556,6 +581,10 @@ function __wbg_get_imports() {
|
|
|
556
581
|
__wbg_debug_87fd9b1a625b7efb: function(arg0) {
|
|
557
582
|
console.debug(arg0);
|
|
558
583
|
},
|
|
584
|
+
__wbg_deleteProperty_36be13e7a282429c: function() { return handleError(function (arg0, arg1) {
|
|
585
|
+
const ret = Reflect.deleteProperty(arg0, arg1);
|
|
586
|
+
return ret;
|
|
587
|
+
}, arguments); },
|
|
559
588
|
__wbg_done_89b2b13e91a60321: function(arg0) {
|
|
560
589
|
const ret = arg0.done;
|
|
561
590
|
return ret;
|
|
@@ -575,6 +604,10 @@ function __wbg_get_imports() {
|
|
|
575
604
|
const ret = arg0.fetch(arg1);
|
|
576
605
|
return ret;
|
|
577
606
|
},
|
|
607
|
+
__wbg_getParameters_b0f02b61e4b42a6e: function(arg0) {
|
|
608
|
+
const ret = arg0.getParameters();
|
|
609
|
+
return ret;
|
|
610
|
+
},
|
|
578
611
|
__wbg_get_507a50627bffa49b: function(arg0, arg1) {
|
|
579
612
|
const ret = arg0[arg1 >>> 0];
|
|
580
613
|
return ret;
|
|
@@ -888,6 +921,10 @@ function __wbg_get_imports() {
|
|
|
888
921
|
const ret = arg0.setLocalDescription(arg1);
|
|
889
922
|
return ret;
|
|
890
923
|
},
|
|
924
|
+
__wbg_setParameters_03d847864c0523f3: function(arg0, arg1) {
|
|
925
|
+
const ret = arg0.setParameters(arg1);
|
|
926
|
+
return ret;
|
|
927
|
+
},
|
|
891
928
|
__wbg_setRemoteDescription_921ff9a4233c90c7: function(arg0, arg1) {
|
|
892
929
|
const ret = arg0.setRemoteDescription(arg1);
|
|
893
930
|
return ret;
|
|
@@ -1018,27 +1055,27 @@ function __wbg_get_imports() {
|
|
|
1018
1055
|
console.warn(arg0);
|
|
1019
1056
|
},
|
|
1020
1057
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1021
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1058
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 290, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1022
1059
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_85f920685b213f97___convert__closures_____invoke___wasm_bindgen_85f920685b213f97___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_85f920685b213f97___JsError___true_);
|
|
1023
1060
|
return ret;
|
|
1024
1061
|
},
|
|
1025
1062
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1026
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
1027
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1063
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 176, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1064
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true_);
|
|
1028
1065
|
return ret;
|
|
1029
1066
|
},
|
|
1030
1067
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1031
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("RTCPeerConnectionIceEvent")], shim_idx:
|
|
1032
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1068
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("RTCPeerConnectionIceEvent")], shim_idx: 176, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1069
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__2);
|
|
1033
1070
|
return ret;
|
|
1034
1071
|
},
|
|
1035
1072
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1036
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("RTCTrackEvent")], shim_idx:
|
|
1037
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1073
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("RTCTrackEvent")], shim_idx: 176, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1074
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__3);
|
|
1038
1075
|
return ret;
|
|
1039
1076
|
},
|
|
1040
1077
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
1041
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1078
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 180, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1042
1079
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_85f920685b213f97___convert__closures_____invoke_______true_);
|
|
1043
1080
|
return ret;
|
|
1044
1081
|
},
|
|
@@ -1082,16 +1119,16 @@ function wasm_bindgen_85f920685b213f97___convert__closures_____invoke_______true
|
|
|
1082
1119
|
wasm.wasm_bindgen_85f920685b213f97___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1083
1120
|
}
|
|
1084
1121
|
|
|
1085
|
-
function
|
|
1086
|
-
wasm.
|
|
1122
|
+
function wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true_(arg0, arg1, arg2) {
|
|
1123
|
+
wasm.wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true_(arg0, arg1, arg2);
|
|
1087
1124
|
}
|
|
1088
1125
|
|
|
1089
|
-
function
|
|
1090
|
-
wasm.
|
|
1126
|
+
function wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__2(arg0, arg1, arg2) {
|
|
1127
|
+
wasm.wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__2(arg0, arg1, arg2);
|
|
1091
1128
|
}
|
|
1092
1129
|
|
|
1093
|
-
function
|
|
1094
|
-
wasm.
|
|
1130
|
+
function wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__3(arg0, arg1, arg2) {
|
|
1131
|
+
wasm.wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__3(arg0, arg1, arg2);
|
|
1095
1132
|
}
|
|
1096
1133
|
|
|
1097
1134
|
function wasm_bindgen_85f920685b213f97___convert__closures_____invoke___wasm_bindgen_85f920685b213f97___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_85f920685b213f97___JsError___true_(arg0, arg1, arg2) {
|
|
Binary file
|
|
@@ -31,6 +31,7 @@ export const reactorclient_sendCommand: (a: number, b: number, c: number, d: num
|
|
|
31
31
|
export const reactorclient_sessionId: (a: number) => [number, number];
|
|
32
32
|
export const reactorclient_sessionInfo: (a: number) => [number, number, number];
|
|
33
33
|
export const reactorclient_setJwt: (a: number, b: number) => [number, number];
|
|
34
|
+
export const reactorclient_setTrackBitrate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
34
35
|
export const reactorclient_status: (a: number) => any;
|
|
35
36
|
export const reactorclient_trackMapping: (a: number) => [number, number, number];
|
|
36
37
|
export const reactorclient_tracks: (a: number) => [number, number, number];
|
|
@@ -38,9 +39,9 @@ export const reactorclient_unpublishTrack: (a: number, b: number, c: number) =>
|
|
|
38
39
|
export const reactorclient_uploadFile: (a: number, b: any, c: number, d: number) => any;
|
|
39
40
|
export const wasm_bindgen_85f920685b213f97___convert__closures_____invoke___wasm_bindgen_85f920685b213f97___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_85f920685b213f97___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
40
41
|
export const wasm_bindgen_85f920685b213f97___convert__closures_____invoke___js_sys_17f5e83adf9a2bda___Function_fn_wasm_bindgen_85f920685b213f97___JsValue_____wasm_bindgen_85f920685b213f97___sys__Undefined___js_sys_17f5e83adf9a2bda___Function_fn_wasm_bindgen_85f920685b213f97___JsValue_____wasm_bindgen_85f920685b213f97___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
42
|
+
export const wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true_: (a: number, b: number, c: any) => void;
|
|
43
|
+
export const wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__2: (a: number, b: number, c: any) => void;
|
|
44
|
+
export const wasm_bindgen_85f920685b213f97___convert__closures_____invoke___web_sys_9b25b1d5883c10fa___features__gen_MessageEvent__MessageEvent______true__3: (a: number, b: number, c: any) => void;
|
|
44
45
|
export const wasm_bindgen_85f920685b213f97___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
45
46
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
46
47
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|