@realsee/live 0.5.0-alpha.11 → 0.5.0-alpha.14
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 +20 -20
- 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 +20 -20
- package/dist/realsee-live.esm.js.map +1 -1
- package/dist/realsee-live.umd.development.js +20 -20
- 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
|
@@ -51415,7 +51415,7 @@
|
|
|
51415
51415
|
this._handleMessage = (liveMsg) => __awaiter$$(this, void 0, void 0, function* () {
|
|
51416
51416
|
var _b, _c, _d, _e, _f, _g;
|
|
51417
51417
|
if (typeof liveMsg === 'object') {
|
|
51418
|
-
const { command, data, frontRequestId, code, message } = liveMsg;
|
|
51418
|
+
const { command, data = {}, frontRequestId, code, message } = liveMsg;
|
|
51419
51419
|
if (code === 'SUCCESS') {
|
|
51420
51420
|
switch (command) {
|
|
51421
51421
|
/**
|
|
@@ -54392,11 +54392,11 @@
|
|
|
54392
54392
|
* @deprecated
|
|
54393
54393
|
* @returns
|
|
54394
54394
|
*/
|
|
54395
|
-
const unsafe__useLiveInstance = () =>
|
|
54395
|
+
const unsafe__useLiveInstance = () => live;
|
|
54396
54396
|
/**
|
|
54397
54397
|
* 使用rtc实例
|
|
54398
54398
|
*/
|
|
54399
|
-
const useRTCInstance = () =>
|
|
54399
|
+
const useRTCInstance = () => live.$RTC;
|
|
54400
54400
|
/**
|
|
54401
54401
|
* 不建议这样使用
|
|
54402
54402
|
* @deprecated
|
|
@@ -54406,7 +54406,7 @@
|
|
|
54406
54406
|
/**
|
|
54407
54407
|
* 带看连接操作
|
|
54408
54408
|
*/
|
|
54409
|
-
const useConnect = () => (options) => __awaiter$$(this, void 0, void 0, function* () { return yield
|
|
54409
|
+
const useConnect = () => (options) => __awaiter$$(this, void 0, void 0, function* () { return yield live.connect(options); });
|
|
54410
54410
|
/**
|
|
54411
54411
|
*
|
|
54412
54412
|
* @param name
|
|
@@ -54430,17 +54430,17 @@
|
|
|
54430
54430
|
*/
|
|
54431
54431
|
function useLiveAction() {
|
|
54432
54432
|
const live = useLiveInstance();
|
|
54433
|
-
const connect =
|
|
54434
|
-
const toggleMicro =
|
|
54435
|
-
const broadcast =
|
|
54436
|
-
const exit =
|
|
54437
|
-
const kick =
|
|
54438
|
-
const forbidMicro =
|
|
54439
|
-
const forbidSync =
|
|
54440
|
-
const getFramesByKey =
|
|
54441
|
-
const sendKeyframe =
|
|
54442
|
-
const setSelfInfo =
|
|
54443
|
-
const updateStatus =
|
|
54433
|
+
const connect = (options) => __awaiter$$(this, void 0, void 0, function* () { return yield live.connect(options); });
|
|
54434
|
+
const toggleMicro = (microStatus) => live.toggleMicro(microStatus);
|
|
54435
|
+
const broadcast = (data, toUserIds, timeout = 0) => __awaiter$$(this, void 0, void 0, function* () { return yield live.broadcast(data, toUserIds, timeout); });
|
|
54436
|
+
const exit = () => __awaiter$$(this, void 0, void 0, function* () { return yield live.exit(); });
|
|
54437
|
+
const kick = (toUserIds) => __awaiter$$(this, void 0, void 0, function* () { return yield live.kick(toUserIds); });
|
|
54438
|
+
const forbidMicro = (micro, toUserIds = []) => __awaiter$$(this, void 0, void 0, function* () { return yield live.forbidMicro(micro, toUserIds); });
|
|
54439
|
+
const forbidSync = (sync, toUserIds = []) => live.forbidSync(sync, toUserIds);
|
|
54440
|
+
const getFramesByKey = (key) => live.getFramesByKey(key);
|
|
54441
|
+
const sendKeyframe = (key, frame) => live.sendKeyframe(key, frame);
|
|
54442
|
+
const setSelfInfo = (userInfo) => live.setSelfInfo(userInfo);
|
|
54443
|
+
const updateStatus = (evtType, atnType, status, toUserIds) => live.updateStatus(evtType, atnType, status, toUserIds);
|
|
54444
54444
|
return {
|
|
54445
54445
|
connect,
|
|
54446
54446
|
broadcast,
|
|
@@ -54494,11 +54494,11 @@
|
|
|
54494
54494
|
}
|
|
54495
54495
|
function useRTCAction() {
|
|
54496
54496
|
const live = useLiveInstance();
|
|
54497
|
-
const join =
|
|
54498
|
-
const quit =
|
|
54499
|
-
const shock =
|
|
54500
|
-
const toggleMicro =
|
|
54501
|
-
const detectMicro =
|
|
54497
|
+
const join = (options) => live.$RTC.join(options);
|
|
54498
|
+
const quit = () => live.$RTC.quit();
|
|
54499
|
+
const shock = () => { var _a, _b; return (_b = (_a = live.$RTC).shock) === null || _b === void 0 ? void 0 : _b.call(_a); };
|
|
54500
|
+
const toggleMicro = (flag) => live.$RTC.toggleMicro(flag);
|
|
54501
|
+
const detectMicro = () => live.$RTC.detectMicro();
|
|
54502
54502
|
return {
|
|
54503
54503
|
join,
|
|
54504
54504
|
quit,
|