@realsee/live 0.5.0-alpha.11 → 0.5.0-alpha.12
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/live/createLiveReact.d.ts +1 -1
- package/dist/realsee-live.cjs.development.js +16 -16
- package/dist/realsee-live.cjs.development.js.map +1 -1
- package/dist/realsee-live.cjs.production.js +1 -1
- package/dist/realsee-live.cjs.production.js.map +1 -1
- package/dist/realsee-live.esm.js +16 -16
- package/dist/realsee-live.esm.js.map +1 -1
- package/dist/realsee-live.umd.development.js +16 -16
- package/dist/realsee-live.umd.development.js.map +1 -1
- package/dist/realsee-live.umd.production.js +1 -1
- package/dist/realsee-live.umd.production.js.map +1 -1
- package/docs/modules.html +4 -4
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ export declare function createLiveReact<KeyframesSnapshot>(options: LiveOptions)
|
|
|
20
20
|
useKeyframeUpdateCallback: <KeyOfKeyframe extends keyof KeyframeTypes<KeyframesSnapshot>>(key: KeyOfKeyframe, callback: (...args: Parameters<KeyframeTypes<KeyframesSnapshot>[KeyOfKeyframe]>) => ReturnType<KeyframeTypes<KeyframesSnapshot>[KeyOfKeyframe]>, deps?: React.DependencyList) => () => void;
|
|
21
21
|
useLiveAction: () => {
|
|
22
22
|
connect: (options: LiveConnectOptions) => Promise<boolean | Error>;
|
|
23
|
-
broadcast: (data: Record<string, any>, toUserIds: string | string[], timeout?:
|
|
23
|
+
broadcast: (data: Record<string, any>, toUserIds: string | string[], timeout?: number) => Promise<unknown>;
|
|
24
24
|
exit: () => Promise<boolean>;
|
|
25
25
|
kick: (toUserIds: string | string[]) => Promise<boolean>;
|
|
26
26
|
toggleMicro: (microStatus: boolean) => Promise<boolean>;
|
|
@@ -2303,17 +2303,17 @@ function createLiveReact(options) {
|
|
|
2303
2303
|
*/
|
|
2304
2304
|
function useLiveAction() {
|
|
2305
2305
|
const live = useLiveInstance();
|
|
2306
|
-
const connect =
|
|
2307
|
-
const toggleMicro =
|
|
2308
|
-
const broadcast =
|
|
2309
|
-
const exit =
|
|
2310
|
-
const kick =
|
|
2311
|
-
const forbidMicro =
|
|
2312
|
-
const forbidSync =
|
|
2313
|
-
const getFramesByKey =
|
|
2314
|
-
const sendKeyframe =
|
|
2315
|
-
const setSelfInfo =
|
|
2316
|
-
const updateStatus =
|
|
2306
|
+
const connect = (options) => __awaiter(this, void 0, void 0, function* () { return yield live.connect(options); });
|
|
2307
|
+
const toggleMicro = (microStatus) => live.toggleMicro(microStatus);
|
|
2308
|
+
const broadcast = (data, toUserIds, timeout = 0) => __awaiter(this, void 0, void 0, function* () { return yield live.broadcast(data, toUserIds, timeout); });
|
|
2309
|
+
const exit = () => __awaiter(this, void 0, void 0, function* () { return yield live.exit(); });
|
|
2310
|
+
const kick = (toUserIds) => __awaiter(this, void 0, void 0, function* () { return yield live.kick(toUserIds); });
|
|
2311
|
+
const forbidMicro = (micro, toUserIds = []) => __awaiter(this, void 0, void 0, function* () { return yield live.forbidMicro(micro, toUserIds); });
|
|
2312
|
+
const forbidSync = (sync, toUserIds = []) => live.forbidSync(sync, toUserIds);
|
|
2313
|
+
const getFramesByKey = (key) => live.getFramesByKey(key);
|
|
2314
|
+
const sendKeyframe = (key, frame) => live.sendKeyframe(key, frame);
|
|
2315
|
+
const setSelfInfo = (userInfo) => live.setSelfInfo(userInfo);
|
|
2316
|
+
const updateStatus = (evtType, atnType, status, toUserIds) => live.updateStatus(evtType, atnType, status, toUserIds);
|
|
2317
2317
|
return {
|
|
2318
2318
|
connect,
|
|
2319
2319
|
broadcast,
|
|
@@ -2367,11 +2367,11 @@ function createLiveReact(options) {
|
|
|
2367
2367
|
}
|
|
2368
2368
|
function useRTCAction() {
|
|
2369
2369
|
const live = useLiveInstance();
|
|
2370
|
-
const join =
|
|
2371
|
-
const quit =
|
|
2372
|
-
const shock =
|
|
2373
|
-
const toggleMicro =
|
|
2374
|
-
const detectMicro =
|
|
2370
|
+
const join = (options) => live.$RTC.join(options);
|
|
2371
|
+
const quit = () => live.$RTC.quit();
|
|
2372
|
+
const shock = () => { var _a, _b; return (_b = (_a = live.$RTC).shock) === null || _b === void 0 ? void 0 : _b.call(_a); };
|
|
2373
|
+
const toggleMicro = (flag) => live.$RTC.toggleMicro(flag);
|
|
2374
|
+
const detectMicro = () => live.$RTC.detectMicro();
|
|
2375
2375
|
return {
|
|
2376
2376
|
join,
|
|
2377
2377
|
quit,
|